]> git.sur5r.net Git - cc65/commitdiff
- Add a way to give additional compiler flags with USER_CFLAGS. 66/head
authorChristian Groessler <chris@groessler.org>
Wed, 18 Dec 2013 20:54:14 +0000 (21:54 +0100)
committerChristian Groessler <chris@groessler.org>
Wed, 18 Dec 2013 20:56:17 +0000 (21:56 +0100)
- Add possibility to specify an file name extension for generated executables (PROGEXT).

src/Makefile

index 3d046314735728105a9d860eccabf63d49755971..1a55f1fb256d76109d7ab03935c859d1dae45a8e 100644 (file)
@@ -29,7 +29,8 @@ endif
 CFLAGS += -MMD -MP -O -std=c89 -I common \
           -Wall -Wextra -Wno-char-subscripts -Werror \
           -DCA65_INC=$(CA65_INC) -DCC65_INC=$(CC65_INC) \
-          -DLD65_LIB=$(LD65_LIB) -DLD65_OBJ=$(LD65_OBJ) -DLD65_CFG=$(LD65_CFG)
+          -DLD65_LIB=$(LD65_LIB) -DLD65_OBJ=$(LD65_OBJ) -DLD65_CFG=$(LD65_CFG) \
+          $(USER_CFLAGS)
 
 LDLIBS += -lm
 
@@ -88,10 +89,10 @@ define PROG_template
 
 $$(eval $$(call OBJS_template,$1))
 
-../bin/$1: $$($1_OBJS) ../wrk/common/common.a | ../bin
+../bin/$1$(PROGEXT): $$($1_OBJS) ../wrk/common/common.a | ../bin
        $$(CC) $$(LDFLAGS) -o $$@ $$^ $$(LDLIBS)
 
-$1: ../bin/$1
+$1: ../bin/$1$(PROGEXT)
 
 endef