From b8e665e8377fcc7a536850ea96a701e71ad0171b Mon Sep 17 00:00:00 2001 From: uz Date: Thu, 24 Sep 2009 15:07:11 +0000 Subject: [PATCH] Change the makefiles so that CFLAGS that are special for the application are appended after assigning the base value to CFLAGS. This allows to change CFLAGS on the command line without too much hassle. git-svn-id: svn://svn.cc65.org/cc65/trunk@4219 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ar65/make/gcc.mak | 7 ++++++- src/ca65/make/gcc.mak | 3 ++- src/cc65/make/gcc.mak | 10 ++++++---- src/cl65/make/gcc.mak | 12 +++++++----- src/co65/make/gcc.mak | 7 ++++++- src/da65/make/gcc.mak | 14 ++++++++++---- src/grc/make/gcc.mak | 8 +++++++- src/ld65/make/gcc.mak | 9 +++++---- src/od65/make/gcc.mak | 14 ++++++++++---- src/sim65/make/gcc.mak | 8 +++++++- 10 files changed, 66 insertions(+), 26 deletions(-) diff --git a/src/ar65/make/gcc.mak b/src/ar65/make/gcc.mak index 665aa8f2c..a09d49761 100644 --- a/src/ar65/make/gcc.mak +++ b/src/ar65/make/gcc.mak @@ -10,12 +10,17 @@ EXE = ar65 # Library dir COMMON = ../common -CFLAGS = -g -O2 -Wall -W -std=c89 -I$(COMMON) +# CC = gcc +CFLAGS = -g -O2 -Wall -W -std=c89 +CFLAGS += -I$(COMMON) EBIND = emxbind LDFLAGS = +# ----------------------------------------------------------------------------- +# List of all object files + OBJS = add.o \ del.o \ error.o \ diff --git a/src/ca65/make/gcc.mak b/src/ca65/make/gcc.mak index 9a8ea79ba..f579fc7ed 100644 --- a/src/ca65/make/gcc.mak +++ b/src/ca65/make/gcc.mak @@ -13,10 +13,11 @@ COMMON = ../common # Several search paths. You may redefine these on the command line CA65_INC = \"/usr/lib/cc65/asminc/\" +# +CC = gcc CFLAGS = -g -O2 -Wall -W -std=c89 CFLAGS += -I$(COMMON) CFLAGS += -DCA65_INC=$(CA65_INC) -CC = gcc EBIND = emxbind LDFLAGS = diff --git a/src/cc65/make/gcc.mak b/src/cc65/make/gcc.mak index 27399eec8..b87fdec5b 100644 --- a/src/cc65/make/gcc.mak +++ b/src/cc65/make/gcc.mak @@ -18,10 +18,12 @@ COMMON = ../common CC65_INC = \"/usr/lib/cc65/include/\" # -CFLAGS = -O2 -g -Wall -W -std=c89 -I$(COMMON) -DCC65_INC=$(CC65_INC) -CC=gcc -EBIND=emxbind -LDFLAGS=-lm +CC = gcc +CFLAGS = -O2 -g -Wall -W -std=c89 +CFLAGS += -I$(COMMON) +CFLAGS += -DCC65_INC=$(CC65_INC) +EBIND = emxbind +LDFLAGS = -lm # Determine the svn version number if possible ifneq "$(shell which svnversion 2>/dev/null)" "" diff --git a/src/cl65/make/gcc.mak b/src/cl65/make/gcc.mak index 82bb4c259..7fa7bf4b5 100644 --- a/src/cl65/make/gcc.mak +++ b/src/cl65/make/gcc.mak @@ -16,11 +16,13 @@ ifneq ($(Kickstart),) SPAWN = SPAWN_AMIGA endif - -CC=gcc -CFLAGS = -O2 -g -Wall -W -std=c89 -I$(COMMON) -D$(SPAWN) -EBIND = emxbind -LDFLAGS= +# +CC = gcc +CFLAGS = -O2 -g -Wall -W -std=c89 +CFLAGS += -I$(COMMON) +CFLAGS += -D$(SPAWN) +EBIND = emxbind +LDFLAGS = OBJS = error.o \ global.o \ diff --git a/src/co65/make/gcc.mak b/src/co65/make/gcc.mak index 7dbbe9506..2279d30bf 100644 --- a/src/co65/make/gcc.mak +++ b/src/co65/make/gcc.mak @@ -10,11 +10,16 @@ EXE = co65 # Library dir COMMON = ../common -CFLAGS = -g -O2 -Wall -W -std=c89 -I$(COMMON) +# CC = gcc +CFLAGS = -g -O2 -Wall -W -std=c89 +CFLAGS += -I$(COMMON) EBIND = emxbind LDFLAGS = +# ----------------------------------------------------------------------------- +# List of all object files + OBJS = convert.o \ error.o \ fileio.o \ diff --git a/src/da65/make/gcc.mak b/src/da65/make/gcc.mak index 35e2805c7..614d644bf 100644 --- a/src/da65/make/gcc.mak +++ b/src/da65/make/gcc.mak @@ -10,10 +10,16 @@ EXE = da65 # Library dir COMMON = ../common -CFLAGS = -g -O2 -Wall -W -std=c89 -I$(COMMON) -CC=gcc -EBIND=emxbind -LDFLAGS= +# +CC = gcc +CFLAGS = -g -O2 -Wall -W -std=c89 +CFLAGS += -I$(COMMON) +EBIND = emxbind +LDFLAGS = + + +# ----------------------------------------------------------------------------- +# List of all object files OBJS = asminc.o \ attrtab.o \ diff --git a/src/grc/make/gcc.mak b/src/grc/make/gcc.mak index e5d7c9eff..e6876077c 100644 --- a/src/grc/make/gcc.mak +++ b/src/grc/make/gcc.mak @@ -9,11 +9,17 @@ EXE = grc COMMON = ../common -CFLAGS = -g -O2 -Wall -W -std=c89 -I$(COMMON) +# CC = gcc +CFLAGS = -g -O2 -Wall -W -std=c89 +CFLAGS += -I$(COMMON) LDFLAGS = EBIND = emxbind + +# ----------------------------------------------------------------------------- +# List of all object files + OBJS = grc.o LIBS = $(COMMON)/common.a diff --git a/src/ld65/make/gcc.mak b/src/ld65/make/gcc.mak index f1aa9c1e4..a4b78fc82 100644 --- a/src/ld65/make/gcc.mak +++ b/src/ld65/make/gcc.mak @@ -16,11 +16,12 @@ LD65_OBJ = \"/usr/lib/cc65/lib/\" LD65_CFG = \"/usr/lib/cc65/cfg/\" # -CFLAGS = -g -O2 -Wall -W -std=c89 -I$(COMMON) +CC = gcc +CFLAGS = -g -O2 -Wall -W -std=c89 +CFLAGS += -I$(COMMON) CFLAGS += -DLD65_LIB=$(LD65_LIB) -DLD65_OBJ=$(LD65_OBJ) -DLD65_CFG=$(LD65_CFG) -CC=gcc -EBIND=emxbind -LDFLAGS= +EBIND = emxbind +LDFLAGS = # Perl script for config file conversion CVT=cfg/cvt-cfg.pl diff --git a/src/od65/make/gcc.mak b/src/od65/make/gcc.mak index da18ade97..98958bb5d 100644 --- a/src/od65/make/gcc.mak +++ b/src/od65/make/gcc.mak @@ -11,10 +11,16 @@ EXE = od65 # Library dir COMMON = ../common -CFLAGS = -O2 -g -Wall -W -std=c89 -I$(COMMON) -CC=gcc -EBIND=emxbind -LDFLAGS= +# +CC = gcc +CFLAGS = -O2 -g -Wall -W -std=c89 +CFLAGS += -I$(COMMON) +EBIND = emxbind +LDFLAGS = + + +# ----------------------------------------------------------------------------- +# List of all object files OBJS = dump.o \ error.o \ diff --git a/src/sim65/make/gcc.mak b/src/sim65/make/gcc.mak index 16bdd0f29..0638769d0 100644 --- a/src/sim65/make/gcc.mak +++ b/src/sim65/make/gcc.mak @@ -10,11 +10,17 @@ EXE = sim65 # Library dir COMMON = ../common -CFLAGS = -g -O2 -Wall -W -std=c89 -I$(COMMON) +# CC = gcc +CFLAGS = -g -O2 -Wall -W -std=c89 +CFLAGS += -I$(COMMON) EBIND = emxbind LDFLAGS = + +# ----------------------------------------------------------------------------- +# List of all object files + OBJS = addrspace.o \ callback.o \ cfgdata.o \ -- 2.39.5