Separate release & debug dependencies
This commit is contained in:
parent
776d305b2d
commit
53111971e0
27
Makefile
27
Makefile
@ -58,8 +58,6 @@ ifneq ($(BUILD),$(notdir $(CURDIR)))
|
|||||||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
||||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
||||||
|
|
||||||
export DEPSDIR := $(CURDIR)/deps
|
|
||||||
|
|
||||||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||||
@ -89,7 +87,7 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
|||||||
.PHONY: clean all doc
|
.PHONY: clean all doc
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
all: deps lib/libcitro3d.a lib/libcitro3dd.a
|
all: lib/libcitro3d.a lib/libcitro3dd.a
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
@doxygen Doxyfile
|
@doxygen Doxyfile
|
||||||
@ -109,30 +107,35 @@ install: dist-bin
|
|||||||
lib:
|
lib:
|
||||||
@[ -d $@ ] || mkdir -p $@
|
@[ -d $@ ] || mkdir -p $@
|
||||||
|
|
||||||
deps:
|
|
||||||
@[ -d $@ ] || mkdir -p $@
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
@[ -d $@ ] || mkdir -p $@
|
@[ -d $@ ] || mkdir -p $@
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
@[ -d $@ ] || mkdir -p $@
|
@[ -d $@ ] || mkdir -p $@
|
||||||
|
|
||||||
lib/libcitro3d.a : lib release
|
lib/libcitro3d.a : lib release $(SOURCES) $(INCLUDES)
|
||||||
@$(MAKE) BUILD=release OUTPUT=$(CURDIR)/$@ BUILD_CFLAGS="-DNDEBUG=1 -O2 -fomit-frame-pointer" --no-print-directory -C release -f $(CURDIR)/Makefile
|
@$(MAKE) BUILD=release OUTPUT=$(CURDIR)/$@ \
|
||||||
|
BUILD_CFLAGS="-DNDEBUG=1 -O2 -fomit-frame-pointer" \
|
||||||
|
DEPSDIR=$(CURDIR)/release \
|
||||||
|
--no-print-directory -C release \
|
||||||
|
-f $(CURDIR)/Makefile
|
||||||
|
|
||||||
lib/libcitro3dd.a : lib debug
|
lib/libcitro3dd.a : lib debug $(SOURCES) $(INCLUDES)
|
||||||
@$(MAKE) BUILD=debug OUTPUT=$(CURDIR)/$@ BUILD_CFLAGS="-DDEBUG=1 -Og" --no-print-directory -C debug -f $(CURDIR)/Makefile
|
@$(MAKE) BUILD=debug OUTPUT=$(CURDIR)/$@ \
|
||||||
|
BUILD_CFLAGS="-DDEBUG=1 -Og" \
|
||||||
|
DEPSDIR=$(CURDIR)/debug \
|
||||||
|
--no-print-directory -C debug \
|
||||||
|
-f $(CURDIR)/Makefile
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
clean:
|
clean:
|
||||||
@echo clean ...
|
@echo clean ...
|
||||||
@rm -fr deps release debug lib
|
@rm -fr release debug lib
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
else
|
else
|
||||||
|
|
||||||
DEPENDS := $(foreach file,$(OFILES:.o=.d),$(DEPSDIR)/$(file))
|
DEPENDS := $(OFILES:.o=.d)
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# main targets
|
# main targets
|
||||||
|
Loading…
Reference in New Issue
Block a user