linux fixes
This commit is contained in:
parent
316456b635
commit
17ef133790
3
config
3
config
@ -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:
|
||||||
|
21
makefile
21
makefile
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user