--- gogoc-pal/Makefile.orig 2010-03-07 17:38:30.000000000 +0100 +++ gogoc-pal/Makefile 2010-11-19 19:40:21.000000000 +0100 @@ -27,11 +27,10 @@ PLATFORM :=$(shell [ -z "$(platform)" ] && uname | tr "[A-Z]" "[a-z]" || echo "$(platform)" ) SUPPORTED_PLATFORMS=linux netbsd freebsd openbsd darwin sunos gogocpe -CC=gcc +CC?=gcc - # Export these variables to sub-makes. -export PLATFORM PLATFORM_DIR OBJS_DIR DEFS_DIR OUT_INC_DIR CC DEBUG +export PLATFORM PLATFORM_DIR OBJS_DIR DEFS_DIR OUT_INC_DIR DEBUG # --- gogoc-tsp/src/lib/Makefile.orig 2009-11-20 17:53:36.000000000 +0100 +++ gogoc-tsp/src/lib/Makefile 2010-11-19 19:42:39.000000000 +0100 @@ -14,11 +14,11 @@ ifdef DEBUG -CFLAGS=-g -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT -DDEBUG +CFLAGS+=-g -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT -DDEBUG else -CFLAGS=-O2 -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT +CFLAGS+=-O2 -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT endif -CC=gcc +CC?=gcc OBJS=$(OBJS_DIR)/base64.o \ $(OBJS_DIR)/cli.o \ --- gogoc-tsp/src/net/Makefile.orig 2009-11-20 17:53:38.000000000 +0100 +++ gogoc-tsp/src/net/Makefile 2010-11-19 19:43:55.000000000 +0100 @@ -14,11 +14,11 @@ ifdef DEBUG -CFLAGS=-g -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT -DDEBUG +CFLAGS+=-g -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT -DDEBUG else -CFLAGS=-O2 -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT +CFLAGS+=-O2 -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT endif -CC=gcc +CC?=gcc OBJS=$(OBJS_DIR)/net.o \ $(OBJS_DIR)/net_rudp.o \ --- gogoc-tsp/src/tsp/Makefile.orig 2009-11-20 17:53:40.000000000 +0100 +++ gogoc-tsp/src/tsp/Makefile 2010-11-19 19:50:22.000000000 +0100 @@ -14,11 +14,11 @@ ifdef DEBUG -CFLAGS=-g -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT -DDEBUG +CFLAGS+=-g -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT -DDEBUG else -CFLAGS=-O2 -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT +CFLAGS+=-O2 -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT endif -CC=gcc +CC?=gcc OBJS=$(OBJS_DIR)/tsp_auth.o \ $(OBJS_DIR)/tsp_cap.o \ --- gogoc-tsp/src/xml/Makefile.orig 2009-11-20 17:53:42.000000000 +0100 +++ gogoc-tsp/src/xml/Makefile 2010-11-19 19:51:14.000000000 +0100 @@ -14,11 +14,11 @@ ifdef DEBUG -CFLAGS=-g -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT -DDEBUG +CFLAGS+=-g -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT -DDEBUG else -CFLAGS=-O2 -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT +CFLAGS+=-O2 -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT endif -CC=gcc +CC?=gcc OBJS=$(OBJS_DIR)/xmlparse.o \ $(OBJS_DIR)/xml_req.o \ --- gogoc-tsp/platform/freebsd/Makefile.orig 2009-11-20 17:53:23.000000000 +0100 +++ gogoc-tsp/platform/freebsd/Makefile 2010-11-19 19:53:22.000000000 +0100 @@ -13,13 +13,13 @@ -include platform.mak ifdef DEBUG -CFLAGS=-g -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT -DDEBUG -LDFLAGS=-g $(LD_LIB_PATHS) $(LD_LIBRARIES) -lcrypto -lpthread -lstdc++ +CFLAGS+=-g -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT -DDEBUG +LDFLAGS+=-g $(LD_LIB_PATHS) $(LD_LIBRARIES) -lcrypto -pthread -lstdc++ else -CFLAGS=-O2 -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT -LDFLAGS=$(LD_LIB_PATHS) $(LD_LIBRARIES) -lcrypto -lpthread -lstdc++ +CFLAGS+=-O2 -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -D_REENTRANT +LDFLAGS+=$(LD_LIB_PATHS) $(LD_LIBRARIES) -lcrypto -pthread -lstdc++ endif -CC=gcc +CC?=gcc OBJS=$(OBJS_DIR)/tsp_local.o \ $(OBJS_DIR)/tsp_tun.o --- gogoc-tsp/platform/unix-common/Makefile.orig 2009-11-20 17:53:30.000000000 +0100 +++ gogoc-tsp/platform/unix-common/Makefile 2010-11-19 19:53:49.000000000 +0100 @@ -13,11 +13,11 @@ -include $(PLATFORM_DIR)/$(PLATFORM)/platform.mak ifdef DEBUG -CFLAGS=-g -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -DDEBUG +CFLAGS+=-g -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) -DDEBUG else -CFLAGS=-O2 -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) +CFLAGS+=-O2 -Wall $(CC_INC_PATHS) $(PLATFORM_CFLAGS) endif -CC=gcc +CC?=gcc OS_UNAME=os_uname.h OBJS=$(OBJS_DIR)/unix-main.o --- gogoc-config/Makefile.orig 2009-11-20 17:30:23.000000000 +0100 +++ gogoc-config/Makefile 2010-11-19 20:06:16.000000000 +0100 @@ -23,20 +23,20 @@ GOGOCPALLIB_DIR=$(GOGOCPAL)/out_lib GOGOCPALLIB=gogocpal -CC=gcc +CC?=gcc -CXX=g++ +CXX?=g++ -LD=g++ +LD?=g++ -RANLIB=ranlib +RANLIB?=ranlib -AR=ar +AR?=ar ifdef DEBUG -CXXFLAGS=-g -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DDEBUG $(HACCESS_DEFINES) $(EXTRA_CXXFLAGS) -CFLAGS=-g -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DDEBUG $(HACCESS_DEFINES) $(EXTRA_CFLAGS) -LDFLAGS=-g -L$(LIB_DIR) -L$(GOGOCPALLIB_DIR) -lgogocconfig -l$(GOGOCPALLIB) $(EXTRA_LDFLAGS) +CXXFLAGS+=-g -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DDEBUG $(HACCESS_DEFINES) $(EXTRA_CXXFLAGS) +CFLAGS+=-g -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DDEBUG $(HACCESS_DEFINES) $(EXTRA_CFLAGS) +LDFLAGS+=-g -L$(LIB_DIR) -L$(GOGOCPALLIB_DIR) -lgogocconfig -l$(GOGOCPALLIB) $(EXTRA_LDFLAGS) else -CXXFLAGS=-O2 -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DNDEBUG $(HACCESS_DEFINES) $(EXTRA_CXXFLAGS) -CFLAGS=-O2 -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DNDEBUG $(HACCESS_DEFINES) $(EXTRA_CFLAGS) -LDFLAGS=-O2 -L$(LIB_DIR) -L$(GOGOCPALLIB_DIR) -lgogocconfig -l$(GOGOCPALLIB) $(EXTRA_LDFLAGS) +CXXFLAGS+=-O2 -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DNDEBUG $(HACCESS_DEFINES) $(EXTRA_CXXFLAGS) +CFLAGS+=-O2 -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DNDEBUG $(HACCESS_DEFINES) $(EXTRA_CFLAGS) +LDFLAGS+=-O2 -L$(LIB_DIR) -L$(GOGOCPALLIB_DIR) -lgogocconfig -l$(GOGOCPALLIB) $(EXTRA_LDFLAGS) endif --- gogoc-messaging/Makefile.orig 2009-11-20 17:34:50.000000000 +0100 +++ gogoc-messaging/Makefile 2010-11-19 20:11:29.000000000 +0100 @@ -21,20 +21,20 @@ GOGOCPALLIB_DIR=$(GOGOCPAL)/out_lib GOGOCPALLIB=gogocpal -CC=gcc +CC?=gcc -CXX=g++ +CXX?=g++ -LD=g++ +LD?=g++ -RANLIB=ranlib +RANLIB?=ranlib -AR=ar +AR?=ar ifdef DEBUG -CXXFLAGS=-g -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DDEBUG $(HACCESS_DEFINES) $(EXTRA_CXXFLAGS) -CFLAGS=-g -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DDEBUG $(HACCESS_DEFINES) $(EXTRA_CFLAGS) -LDFLAGS=-g -L$(LIB_DIR) -L$(GOGOCPALLIB_DIR) -lgogocmessaging -l$(GOGOCPALLIB) $(EXTRA_LDFLAGS) +CXXFLAGS+=-g -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DDEBUG $(HACCESS_DEFINES) $(EXTRA_CXXFLAGS) +CFLAGS+=-g -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DDEBUG $(HACCESS_DEFINES) $(EXTRA_CFLAGS) +LDFLAGS+=-g -L$(LIB_DIR) -L$(GOGOCPALLIB_DIR) -lgogocmessaging -l$(GOGOCPALLIB) $(EXTRA_LDFLAGS) else -CXXFLAGS=-O2 -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DNDEBUG $(HACCESS_DEFINES) $(EXTRA_CXXFLAGS) -CFLAGS=-O2 -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DNDEBUG $(HACCESS_DEFINES) $(EXTRA_CFLAGS) -LDFLAGS=-O2 -L$(LIB_DIR) -L$(GOGOCPALLIB_DIR) -lgogocmessaging -l$(GOGOCPALLIB) $(EXTRA_LDFLAGS) +CXXFLAGS+=-O2 -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DNDEBUG $(HACCESS_DEFINES) $(EXTRA_CXXFLAGS) +CFLAGS+=-O2 -I. -I$(GOGOCPALINC_DIR) -I$(GOGOCPALDEFS_DIR) -Wall -D_REENTRANT -DNDEBUG $(HACCESS_DEFINES) $(EXTRA_CFLAGS) +LDFLAGS+=-O2 -L$(LIB_DIR) -L$(GOGOCPALLIB_DIR) -lgogocmessaging -l$(GOGOCPALLIB) $(EXTRA_LDFLAGS) endif