Browse Source

Merge pull request #97 from miconda/master

configurable makefile vars from command line
Alberto Demichelis 8 years ago
parent
commit
a0857ae0b8
2 changed files with 10 additions and 8 deletions
  1. 7 5
      sqstdlib/Makefile
  2. 3 3
      squirrel/Makefile

+ 7 - 5
sqstdlib/Makefile

@@ -1,8 +1,10 @@
 SQUIRREL= ..
 
 
-OUT= $(SQUIRREL)/lib/libsqstdlib.a
-INCZ= -I$(SQUIRREL)/include -I. -Iinclude
+OUT?= $(SQUIRREL)/lib/libsqstdlib.a
+INCZ?= -I$(SQUIRREL)/include -I. -Iinclude
+DEFS= $(CC_EXTRA_FLAGS)
+LIB=
 
 OBJS= \
 	sqstdblob.o \
@@ -26,16 +28,16 @@ SRCS= \
 
 
 sq32:
-	gcc -O2 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ)
+	gcc -O2 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS)
 	ar rc $(OUT) *.o
 	rm *.o
 
 sqprof:
-	gcc -O2 -pg -fno-exceptions -fno-rtti -pie -gstabs -g3 -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ)
+	gcc -O2 -pg -fno-exceptions -fno-rtti -pie -gstabs -g3 -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS)
 	ar rc $(OUT) *.o
 	rm *.o
 
 sq64:
-	gcc -O2 -m64 -fno-exceptions -D_SQ64 -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ)
+	gcc -O2 -m64 -fno-exceptions -D_SQ64 -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS)
 	ar rc $(OUT) *.o
 	rm *.o

+ 3 - 3
squirrel/Makefile

@@ -1,9 +1,9 @@
 SQUIRREL= ..
 
 
-OUT= $(SQUIRREL)/lib/libsquirrel.a
-INCZ= -I$(SQUIRREL)/include -I. -Iinclude
-DEFS=
+OUT?= $(SQUIRREL)/lib/libsquirrel.a
+INCZ?= -I$(SQUIRREL)/include -I. -Iinclude
+DEFS= $(CC_EXTRA_FLAGS)
 LIB=
 
 OBJS= \