Commit 833010a2 authored by Erik Faye-Lund's avatar Erik Faye-Lund
Browse files

makefile: build examples from master makefile

parent 7697190e
......@@ -157,13 +157,14 @@ make-host-deps = $(addprefix $(HOST_BUILD_DIR)/, $(call source-to-depend, $1
OBJS = $(call make-target-objs, $(SOURCES))
.PHONY: all clean check check-syntax
.PHONY: all clean check check-syntax examples
all: lib/libpimp_gba.a bin/pimpconv$(EXE_EXT)
clean:
$(RM) lib/libpimp_gba.a $(call make-target-objs, $(SOURCES)) $(call make-target-deps, $(SOURCES))
$(RM) bin/pimpconv$(EXE_EXT) $(call make-host-objs, $(PIMPCONV_SOURCES)) $(call make-host-deps, $(PIMPCONV_SOURCES))
$(MAKE) -C examples clean
distclean:
$(RM) -r $(BUILD_DIR)
......@@ -174,6 +175,9 @@ check:
check-syntax:
$(TARGET_CC) $(CPPFLAGS) $(TARGET_CPPFLAGS) $(CFLAGS) -fsyntax-only $(filter %.c,$(SOURCES))
examples: lib/libpimp_gba.a bin/pimpconv$(EXE_EXT)
$(MAKE) -C examples
TAGS:
$(CTAGS) $(filter %.c,$(SOURCES))
......
......@@ -34,6 +34,7 @@ LDFLAGS = -mthumb-interwork -Wl,--gc-section
ASFLAGS = -mthumb-interwork
LDLIBS = -L$(PIMPMOBILE)/lib -lpimp_gba -L$(LIBGBA)/lib -lgba
TARGET_ARCH = -specs=gba.specs
CONVERTER = $(PIMPMOBILE)/bin/pimpconv$(EXE_EXT)
ARM = -marm
THUMB = -mthumb
......@@ -56,8 +57,6 @@ EXTRA_OBJS = \
../src/convert_sample.o \
../src/pimp_sample_bank.o
CONVERTER = $(PIMPMOBILE)/bin/pimpconv$(EXE_EXT)
ifeq ($(DEBUG), 1)
CPPFLAGS += -DDEBUG
CXXFLAGS += -g3 -ggdb
......@@ -75,9 +74,6 @@ clean:
%.gbfs:
gbfs $@ $<
$(CONVERTER)::
$(MAKE) -C .. bin/pimpconv$(EXE_EXT)
%.elf: %.cpp $(EXTRA_OBJS)
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment