diff --git a/src/Makefile b/src/Makefile index 8c31255b..91255854 100644 --- a/src/Makefile +++ b/src/Makefile @@ -64,6 +64,11 @@ TAR = tar # Note : --transform option was added in GNU tar version 1.15.91 TARTRANSFORM = --strip=1 --transform 's,^,grafx2/,g' +# default to gcc compiler +ifeq (default,$(origin CC)) + CC = gcc +endif + # There is no uname under windows, but we can guess we are there with the COMSPEC env.var # Windows specific ifdef COMSPEC @@ -75,7 +80,6 @@ ifdef COMSPEC COPT = -W -Wall -Wdeclaration-after-statement -O$(OPTIM) -g -ggdb `sdl-config --cflags` $(TTFCOPT) $(JOYCOPT) $(LUACOPT) LOPT = `sdl-config --libs` -lSDL_image $(TTFLOPT) -lpng -lz $(LUALOPT) LUALOPT = -llua - CC = gcc OBJDIR = ../obj/win32 # Resources (icon) WINDRES = windres.exe @@ -98,7 +102,6 @@ else BIN = ../bin/grafx2 COPT = -Wall -gstabs $(shell sdl-config --cflags) $(TTFCOPT) LOPT = $(shell sdl-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT) -lft2 - CC = gcc OBJDIR = ../obj/amiga ZIP = lha ZIPOPT = a @@ -198,7 +201,6 @@ endif COPT += -DENABLE_FILENAMES_ICONV LOPT += -liconv # Use gcc for compiling. Use ncc to build a callgraph and analyze the code. - CC = gcc #CC = nccgen -ncgcc -ncld -ncfabs OBJDIR = ../obj/macosx PLATFORMOBJ = SDLMain.o @@ -215,7 +217,6 @@ endif BIN = ../bin/grafx2 COPT = -Wall -g $(shell sdl-config --cflags) $(TTFCOPT) LOPT = -lSDL_image $(shell sdl-config --libs) -lpng -ljpeg -lz $(TTFLOPT) -lfreetype2shared - CC = gcc OBJDIR = ../obj/aros STRIP = strip --strip-unneeded --remove-section .comment ZIP = lha @@ -231,7 +232,6 @@ endif BIN = ../bin/grafx2 COPT = -Wall -gstabs $(shell sdl-config --cflags) $(TTFCOPT) LOPT = -lSDL_image $(shell sdl-config --libs) -lpng -ljpeg -lz $(TTFLOPT) - CC = gcc OBJDIR = ../obj/morphos ZIP = lha ZIPOPT = a @@ -247,7 +247,6 @@ endif BIN = ../bin/grafx2 COPT = -W -Wall -g $(shell sdl-config --cflags) $(TTFCOPT) -I/boot/home/config/include LOPT = $(shell sdl-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT) - CC = gcc OBJDIR = ../obj/beos ZIP = zip @@ -271,7 +270,6 @@ endif COPT = -W -Wall -g $(shell sdl-config --cflags) $(TTFCOPT) -I/boot/common/include $(LUACOPT) COPT += -DENABLE_FILENAMES_ICONV LOPT = $(shell sdl-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT) -lfreetype -lbe $(LUALOPT) -liconv - CC = gcc #Append the gcc kind to the objdir (gcc2 or gcc4) to avoid conflicts when switching from one to other. OBJKIND = $(shell gcc -dumpversion) OBJDIR = ../obj/haiku/$(OBJKIND) @@ -287,7 +285,6 @@ endif BIN = ../bin/grafx2 COPT = -W -Wall -Wdeclaration-after-statement -g $(shell sdl-config --cflags) $(TTFCOPT) LOPT = $(shell sdl-config --libs) -lSDL_image -lpng -ljpeg -lz $(TTFLOPT) - CC = gcc OBJDIR = ../obj/skyos ZIP = zip @@ -306,7 +303,6 @@ endif OBJDIR = ../obj/unix FCLOPT = -lfontconfig COPT += -DUSE_FC - CC = gcc else ifeq ($(PLATFORM),FreeMiNT) #10 #Atari FreeMiNT/TOS specific @@ -316,7 +312,6 @@ endif CP = cp ZIP = zip PLATFORMFILES = ../share/grafx2/gfx2.png - CC = gcc BIN = ../bin/grafx2.ttp LUALOPT = -llua OBJDIR = ../obj/m68k-atari-mint @@ -341,7 +336,6 @@ endif BIN = ../bin/grafx2 COPT = -W -Wall -Wdeclaration-after-statement -std=c99 -g `sdl-config --cflags` -I/resources/indexes/include/SDL $(TTFCOPT) $(LUACOPT) $(JOYCOPT) -O$(OPTIM) LOPT = `sdl-config --libs` -lSDL_image $(TTFLOPT) -lpng -lz $(LUALOPT) -lm - CC = gcc OBJDIR = ../obj/syllable FCLOPT = else @@ -464,7 +458,6 @@ endif LOPT = $(shell sdl-config --libs) -lSDL_image $(TTFLOPT) LOPT += $(shell pkg-config --libs libpng) LOPT += $(LUALOPT) -lm - CC = gcc OBJDIR = ../obj/unix FCLOPT = -lfontconfig COPT += -DUSE_FC