Makefiles: Force building 32 or 64 bit by setting ARCH=32 or 64
[sdk] / compiler / bootstrap / ecp / Makefile
index 1345741..a92781d 100644 (file)
@@ -17,6 +17,7 @@ ifndef DEBIAN_PACKAGE
 CFLAGS =
 LDFLAGS =
 endif
+PRJ_CFLAGS =
 CECFLAGS =
 OFLAGS =
 LIBS =
@@ -58,8 +59,8 @@ LIBS += \
        $(call _L,ecBootstrap)
 endif
 
-CFLAGS += \
-        $(if $(DEBUG), -g, -O2 -ffast-math) $(FORCE_32_BIT) $(FPIC) -w \
+PRJ_CFLAGS += \
+        $(if $(DEBUG), -g, -O2 -ffast-math) $(FPIC) -w \
                         -DECERE_STATIC
 
 
@@ -84,9 +85,9 @@ endif
 CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
-OFLAGS += $(FORCE_32_BIT) \
-        -L../ecere/obj/bootstrap.$(PLATFORM) \
-        -L../libec/obj/bootstrap.$(PLATFORM)
+OFLAGS += \
+        -L../ecere/obj/bootstrap.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX) \
+        -L../libec/obj/bootstrap.$(PLATFORM)$(COMPILER_SUFFIX)$(DEBUG_SUFFIX)
 endif
 
 # TARGETS
@@ -105,17 +106,17 @@ endif
 # OBJECT RULES
 
 $(OBJ)ecp.o: bootstrap/ecp.c
-       $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/ecp.c -o $(OBJ)ecp.o
+       $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/ecp.c -o $(OBJ)ecp.o
 
 $(OBJ)ecp.main.o: bootstrap/ecp.main.c
-       $(CC) $(CFLAGS) $(FVISIBILITY) -c bootstrap/ecp.main.c -o $(OBJ)ecp.main.o
+       $(CC) $(CFLAGS) $(PRJ_CFLAGS) $(FVISIBILITY) -c bootstrap/ecp.main.c -o $(OBJ)ecp.main.o
 
 clean: objdir
        $(call rmq,$(TARGET))
        $(call rmq,$(OBJECTS))
 
-realclean: clean
+realclean: objdir
        $(call rmrq,$(OBJ))
 
-distclean:
+distclean: objdir
        $(call rmrq,obj/)