linux fixes

This commit is contained in:
James Turk 2003-10-05 19:21:03 +00:00
parent 316456b635
commit 17ef133790
2 changed files with 16 additions and 8 deletions

3
config
View File

@ -14,7 +14,8 @@ BUILD_NAME=ZEngine-0.8.4
GL_LIB_NAME=GL GL_LIB_NAME=GL
##Define compiler commands: ##Define compiler commands:
CC=g++ CC=gcc #c compiler
CPPC=g++ #cpp compiler
AR=ar rcs AR=ar rcs
###Define compiler options: ###Define compiler options:

View File

@ -1,24 +1,31 @@
#Makefile for ZEngine #Makefile for ZEngine
#Created and maintained by James Turk
#Incremental build optimizations submitted by Atani
include $(CURDIR)/config include $(CURDIR)/config
#defines the user shouldn't change# #defines the user shouldn't change#
INCLUDES = -I$(CURDIR)/include $(SDL_INC_PATH) $(GL_INC_PATH) INCLUDES = -I$(CURDIR)/include $(SDL_INC_PATH) $(GL_INC_PATH)
LIBRARIES = -L$(CURDIR)/lib $(SDL_LIB_PATH) $(GL_LIB_PATH) LIBRARIES = -L$(CURDIR)/lib $(SDL_LIB_PATH) $(GL_LIB_PATH)
CFLAGS = $(EXTRA_OPTIONS) $(WARN_LEVEL) $(INCLUDES) $(LIBRARIES) CPPFLAGS = $(EXTRA_OPTIONS) $(WARN_LEVEL) $(INCLUDES) $(LIBRARIES)
CFLAGS = -w
LIB_OUT = $(CURDIR)/lib/libZEngineS.a LIB_OUT = $(CURDIR)/lib/libZEngineS.a
ALL_TESTS = ZFontTest ZMouseTest ZMusicTest ZSoundTest ZTimerTest ZImageTest ZRectTest ZParticleTest ALL_TESTS = ZFontTest ZMouseTest ZMusicTest ZSoundTest ZTimerTest ZImageTest ZRectTest ZParticleTest
%.o: $(CURDIR)/src/%.cpp %.o: $(CURDIR)/src/%.cpp
$(CC) $(CFLAGS) -c $< -o $@ $(CPPC) $(CPPFLAGS) -c $< -o $@
%.o: $(CURDIR)/src/external/%.cpp %.o: $(CURDIR)/src/external/%.cpp
$(CPPC) $(CPPFLAGS) -c $< -o $@
%.o: $(CURDIR)/zlib/%.c
$(CC) $(CFLAGS) -c $< -o $@ $(CC) $(CFLAGS) -c $< -o $@
SOURCES = $(wildcard $(CURDIR)/src/external/*.cpp) \ CPP_SOURCES = $(wildcard $(CURDIR)/src/external/*.cpp) \
$(wildcard $(CURDIR)/src/*.cpp) $(wildcard $(CURDIR)/src/*.cpp)
C_SOURCES = $(wildcard $(CURDIR)/zlib/*.c)
#SOURCES with path stripped and .cpp changed to .o #sources with path stripped and .cpp changed to .o
OBJECTS = $(notdir $(SOURCES:.cpp=.o)) OBJECTS = $(notdir $(CPP_SOURCES:.cpp=.o)) $(notdir $(C_SOURCES:.c=.o))
#build targets# #build targets#
@ -32,7 +39,7 @@ $(LIB_OUT): $(OBJECTS)
$(ALL_TESTS) : $(LIB_OUT) $(ALL_TESTS) : $(LIB_OUT)
@echo Building $@... @echo Building $@...
$(CC) $(CFLAGS) $(CURDIR)/test/$@.cpp -o $(CURDIR)/test/bin/$@ $(LIBS) $(CPPC) $(CPPFLAGS) $(CURDIR)/test/$@.cpp -o $(CURDIR)/test/bin/$@ $(LIBS)
@echo $@ compiled. @echo $@ compiled.
.PHONY: $(ALL_TESTS) install clean veryclean .PHONY: $(ALL_TESTS) install clean veryclean