Browse Source

make the compiler configurable by CC variable

this would make it easier to integrate it in upstream projects where more compiler are accepted.
Rick 8 years ago
parent
commit
6ececc28e2
1 changed files with 4 additions and 3 deletions
  1. 4 3
      squirrel/Makefile

+ 4 - 3
squirrel/Makefile

@@ -1,6 +1,7 @@
 SQUIRREL= ..
 SQUIRREL= ..
 
 
 
 
+CC?= gcc
 OUT?= $(SQUIRREL)/lib/libsquirrel.a
 OUT?= $(SQUIRREL)/lib/libsquirrel.a
 INCZ?= -I$(SQUIRREL)/include -I. -Iinclude
 INCZ?= -I$(SQUIRREL)/include -I. -Iinclude
 DEFS= $(CC_EXTRA_FLAGS)
 DEFS= $(CC_EXTRA_FLAGS)
@@ -37,16 +38,16 @@ SRCS= \
 
 
 
 
 sq32:
 sq32:
-	gcc -O2 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS)
+	$(CC) -O2 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS)
 	ar rc $(OUT) *.o
 	ar rc $(OUT) *.o
 	rm *.o
 	rm *.o
 
 
 sqprof:
 sqprof:
-	gcc -O2 -pg -fno-exceptions -fno-rtti -pie -gstabs -g3 -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS)
+	$(CC) -O2 -pg -fno-exceptions -fno-rtti -pie -gstabs -g3 -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS)
 	ar rc $(OUT) *.o
 	ar rc $(OUT) *.o
 	rm *.o
 	rm *.o
 
 
 sq64:
 sq64:
-	gcc -O2 -m64 -D_SQ64 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS)
+	$(CC) -O2 -m64 -D_SQ64 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c $(SRCS) $(INCZ) $(DEFS)
 	ar rc $(OUT) *.o
 	ar rc $(OUT) *.o
 	rm *.o
 	rm *.o