libZRCola: Make parts of the gcc building reusable
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
eedab7da56
commit
823390d28b
11
include/props.mak
Normal file
11
include/props.mak
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
CPPFLAGS := $(CPPFLAGS) -MMD -MP
|
||||||
|
ifeq ($(CFG),Debug)
|
||||||
|
CPPFLAGS := $(CPPFLAGS) -D_DEBUG
|
||||||
|
CXXFLAGS := -Og
|
||||||
|
else
|
||||||
|
CPPFLAGS := $(CPPFLAGS) -DNDEBUG
|
||||||
|
CXXFLAGS := -O3
|
||||||
|
endif
|
||||||
|
|
||||||
|
OBJS := $(SRCS:%=%.o)
|
||||||
|
DEPS := $(OBJS:.o=.d)
|
5
include/targets.mak
Normal file
5
include/targets.mak
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
%.h.gch: %.h
|
||||||
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -x c++-header -o $@ -c $<
|
||||||
|
|
||||||
|
%.cpp.o: %.cpp
|
||||||
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
|
@ -1,12 +1,4 @@
|
|||||||
CPPFLAGS := $(CPPFLAGS) -MMD -MP -I../../stdex/include
|
CPPFLAGS := -I../../stdex/include
|
||||||
ifeq ($(CFG),Debug)
|
|
||||||
CPPFLAGS := $(CPPFLAGS) -D_DEBUG
|
|
||||||
CXXFLAGS := -Og
|
|
||||||
else
|
|
||||||
CPPFLAGS := $(CPPFLAGS) -DNDEBUG
|
|
||||||
CXXFLAGS := -O3
|
|
||||||
endif
|
|
||||||
|
|
||||||
SRCS := \
|
SRCS := \
|
||||||
../src/character.cpp \
|
../src/character.cpp \
|
||||||
../src/common.cpp \
|
../src/common.cpp \
|
||||||
@ -16,20 +8,15 @@ SRCS := \
|
|||||||
../src/pch.cpp \
|
../src/pch.cpp \
|
||||||
../src/tag.cpp \
|
../src/tag.cpp \
|
||||||
../src/translate.cpp
|
../src/translate.cpp
|
||||||
OBJS := $(SRCS:%=%.o)
|
|
||||||
DEPS := $(OBJS:.o=.d)
|
include ../../../include/props.mak
|
||||||
|
|
||||||
../lib/libZRCola.a : ../src/pch.h.gch $(OBJS)
|
../lib/libZRCola.a : ../src/pch.h.gch $(OBJS)
|
||||||
$(AR) $(ARFLAGS) $@ $(OBJS)
|
$(AR) $(ARFLAGS) $@ $(OBJS)
|
||||||
|
|
||||||
%.h.gch: %.h
|
|
||||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -x c++-header -o $@ -c $<
|
|
||||||
|
|
||||||
%.cpp.o: %.cpp
|
|
||||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
-rm -r ../src/*.h.gch ../src/*.cpp.o ../lib/libZRCola.a
|
-rm -r ../src/*.h.gch ../src/*.cpp.o ../lib/libZRCola.a
|
||||||
|
|
||||||
|
include ../../../include/targets.mak
|
||||||
-include $(DEPS)
|
-include $(DEPS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user