diff options
author | mrwastl <mrwastl@users.sourceforge.net> | 2012-06-09 00:42:44 +0200 |
---|---|---|
committer | mrwastl <mrwastl@users.sourceforge.net> | 2012-06-09 00:42:44 +0200 |
commit | 6ce1975169f81c113b343b67821554062d2859e9 (patch) | |
tree | a0419b29495778db6c23ce945f25e53e99e6e553 | |
parent | d251903ec7eb83087ea91d5fe7b489c5e78ec8ee (diff) | |
download | graphlcd-base-6ce1975169f81c113b343b67821554062d2859e9.tar.gz graphlcd-base-6ce1975169f81c113b343b67821554062d2859e9.tar.bz2 |
graphlcd-base can now be compiled by clang, too. simply write 'CXX=clang make' to do so.
-rw-r--r-- | Make.config | 22 | ||||
-rw-r--r-- | glcddrivers/Makefile | 4 | ||||
-rw-r--r-- | glcdgraphics/Makefile | 4 | ||||
-rw-r--r-- | glcdskin/Makefile | 4 | ||||
-rw-r--r-- | tools/convpic/Makefile | 4 | ||||
-rw-r--r-- | tools/crtfont/Makefile | 4 | ||||
-rw-r--r-- | tools/genfont/Makefile | 4 | ||||
-rw-r--r-- | tools/lcdtestpattern/Makefile | 4 | ||||
-rw-r--r-- | tools/showpic/Makefile | 4 | ||||
-rw-r--r-- | tools/showtext/Makefile | 4 |
10 files changed, 39 insertions, 19 deletions
diff --git a/Make.config b/Make.config index cd5c6c6..a14fd18 100644 --- a/Make.config +++ b/Make.config @@ -6,10 +6,30 @@ CC = gcc CFLAGS = -O2 -CXX = g++ +#CXX = g++ + CXXFLAGS = -g -O2 -Wall -Woverloaded-virtual #CXXFLAGS = -g -ggdb -O0 -Wall -Woverloaded-virtual +# no CXX given at all: force g++ +ifeq (x$(CXX)x,xx) + CXX=g++ +endif + +# CXX set to clang++: force clang +ifeq ($(CXX),clang++) + CXX = clang +endif + +# set CXXEXTRA and MAKEDEP according to compiler that is used +ifeq ($(CXX),clang) + CXXEXTRA = -x c++ -Qunused-arguments + MAKEDEP = clang -x c++ -M -MM -Qunused-arguments +else + CXXEXTRA = + MAKEDEP = g++ -MM -MG +endif + #LDFLAGS = -g -ggdb -O0 LDCONFIG = ldconfig diff --git a/glcddrivers/Makefile b/glcddrivers/Makefile index d9f5fc8..f2c287b 100644 --- a/glcddrivers/Makefile +++ b/glcddrivers/Makefile @@ -40,11 +40,11 @@ endif ### Implicit rules: %.o: %.c - $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< + $(CXX) $(CXXEXTRA) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< # Dependencies: -MAKEDEP = g++ -MM -MG +#MAKEDEP = g++ -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ diff --git a/glcdgraphics/Makefile b/glcdgraphics/Makefile index 0a10190..0b7336f 100644 --- a/glcdgraphics/Makefile +++ b/glcdgraphics/Makefile @@ -32,11 +32,11 @@ HEADERS = bitmap.h font.h glcd.h image.h imagefile.h pbm.h extformats.h ### Implicit rules: %.o: %.c - $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< + $(CXX) $(CXXEXTRA) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< # Dependencies: -MAKEDEP = g++ -MM -MG +#MAKEDEP = g++ -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ diff --git a/glcdskin/Makefile b/glcdskin/Makefile index f22aae5..d7f3520 100644 --- a/glcdskin/Makefile +++ b/glcdskin/Makefile @@ -27,11 +27,11 @@ LIBS += -L../glcdgraphics -lglcdgraphics -L../glcddrivers -lglcddrivers ### Implicit rules: %.o: %.c - $(CXX) $(CXXFLAGS) -I.. -c $(DEFINES) $(INCLUDES) $< + $(CXX) $(CXXEXTRA) $(CXXFLAGS) -I.. -c $(DEFINES) $(INCLUDES) $< # Dependencies: -MAKEDEP = g++ -MM -MG +#MAKEDEP = g++ -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ diff --git a/tools/convpic/Makefile b/tools/convpic/Makefile index f666b4e..93cdd71 100644 --- a/tools/convpic/Makefile +++ b/tools/convpic/Makefile @@ -18,11 +18,11 @@ all: $(PRGNAME) # Implicit rules: %.o: %.c - $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< + $(CXX) $(CXXEXTRA) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< # Dependencies: -MAKEDEP = $(CXX) -MM -MG +#MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ diff --git a/tools/crtfont/Makefile b/tools/crtfont/Makefile index 29f0b5e..815ea2e 100644 --- a/tools/crtfont/Makefile +++ b/tools/crtfont/Makefile @@ -17,11 +17,11 @@ all: $(PRGNAME) # Implicit rules: %.o: %.c - $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< + $(CXX) $(CXXEXTRA) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< # Dependencies: -MAKEDEP = $(CXX) -MM -MG +#MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ diff --git a/tools/genfont/Makefile b/tools/genfont/Makefile index bed4d9c..20cab12 100644 --- a/tools/genfont/Makefile +++ b/tools/genfont/Makefile @@ -20,11 +20,11 @@ all: $(PRGNAME) # Implicit rules: %.o: %.c - $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< + $(CXX) $(CXXEXTRA) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< # Dependencies: -MAKEDEP = $(CXX) -MM -MG +#MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ diff --git a/tools/lcdtestpattern/Makefile b/tools/lcdtestpattern/Makefile index 4901534..9b7b905 100644 --- a/tools/lcdtestpattern/Makefile +++ b/tools/lcdtestpattern/Makefile @@ -18,11 +18,11 @@ all: $(PRGNAME) # Implicit rules: %.o: %.c - $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< + $(CXX) $(CXXEXTRA) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< # Dependencies: -MAKEDEP = $(CXX) -MM -MG +#MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ diff --git a/tools/showpic/Makefile b/tools/showpic/Makefile index 17e88d3..93c039a 100644 --- a/tools/showpic/Makefile +++ b/tools/showpic/Makefile @@ -18,11 +18,11 @@ all: $(PRGNAME) # Implicit rules: %.o: %.c - $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< + $(CXX) $(CXXEXTRA) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< # Dependencies: -MAKEDEP = $(CXX) -MM -MG +#MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ diff --git a/tools/showtext/Makefile b/tools/showtext/Makefile index 1da8fb5..542482a 100644 --- a/tools/showtext/Makefile +++ b/tools/showtext/Makefile @@ -18,11 +18,11 @@ all: $(PRGNAME) # Implicit rules: %.o: %.c - $(CXX) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< + $(CXX) $(CXXEXTRA) $(CXXFLAGS) $(LDFLAGS) -c $(DEFINES) $(INCLUDES) $< # Dependencies: -MAKEDEP = $(CXX) -MM -MG +#MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ |