Fix warble and clean up/refactor Makefile.

Change-Id: I8754ad8724e22147b98a156fecea599bdda72292
This commit is contained in:
Thomas Martitz 2012-03-27 00:16:09 +02:00
parent d5f4391187
commit 83cb2e5dae
2 changed files with 15 additions and 19 deletions

View file

@ -12,7 +12,7 @@
RBCODEC_DIR = $(ROOTDIR)/lib/rbcodec
RBCODEC_BLD = $(BUILDDIR)/lib/rbcodec
FLAGS=-g -D__PCTOOL__ $(TARGET) -Wall
GCCOPTS += -D__PCTOOL__ $(TARGET) -DDEBUG -g -std=gnu99 `$(SDLCONFIG) --cflags` -DCODECDIR="\"$(CODECDIR)\""
SRC= $(call preprocess, $(ROOTDIR)/lib/rbcodec/test/SOURCES)
@ -22,21 +22,13 @@ INCLUDES += -I$(ROOTDIR)/firmware/export -I$(ROOTDIR)/firmware/include \
-I$(ROOTDIR)/firmware/target/hosted \
-I$(ROOTDIR)/firmware/target/hosted/sdl
GCCOPTS+=-D__PCTOOL__ -DDEBUG -g -std=gnu99 `$(SDLCONFIG) --cflags` -DCODECDIR="\"$(CODECDIR)\""
LIBS=`$(SDLCONFIG) --libs` -lc
ifneq ($(findstring MINGW,$(shell uname)),MINGW)
LIBS += -ldl
endif
.SECONDEXPANSION: # $$(OBJ) is not populated until after this
include $(ROOTDIR)/tools/functions.make
include $(ROOTDIR)/apps/codecs/codecs.make
include $(ROOTDIR)/lib/rbcodec/rbcodec.make
$(BUILDDIR)/$(BINARY): $(CODECS)
$(BUILDDIR)/$(BINARY): $$(OBJ) $(RBCODEC_LIB)
$(BUILDDIR)/$(BINARY): $$(OBJ) $$(CORE_LIBS)
@echo LD $(BINARY)
$(SILENT)$(HOSTCC) $(SIMFLAGS) $(LIBS) -o $@ $+
$(SILENT)$(HOSTCC) $(LDOPTS) -o $@ $(OBJ) \
-L$(BUILDDIR)/lib $(call a2lnk, $(CORE_LIBS)) \
$(LDOPTS) $(GLOBAL_LDOPTS)

View file

@ -63,12 +63,14 @@ all: $(DEPFILE) build
# dependencies and compile rules
include $(TOOLSDIR)/tools.make
ifeq (,$(findstring checkwps,$(APPSDIR)))
ifeq (,$(findstring database,$(APPSDIR)))
include $(FIRMDIR)/firmware.make
include $(ROOTDIR)/apps/bitmaps/bitmaps.make
ifeq (,$(findstring bootloader,$(APPSDIR)))
include $(ROOTDIR)/lib/skin_parser/skin_parser.make
ifneq (,$(findstring checkwps,$(APP_TYPE)))
ifneq (,$(findstring database,$(APP_TYPE)))
ifneq (,$(findstring warble,$(APP_TYPE)))
include $(FIRMDIR)/firmware.make
include $(ROOTDIR)/apps/bitmaps/bitmaps.make
ifeq (,$(findstring bootloader,$(APPSDIR)))
include $(ROOTDIR)/lib/skin_parser/skin_parser.make
endif
endif
endif
endif
@ -97,6 +99,8 @@ else ifneq (,$(findstring database,$(APP_TYPE)))
include $(APPSDIR)/database.make
else ifneq (,$(findstring warble,$(APP_TYPE)))
include $(ROOTDIR)/lib/rbcodec/test/warble.make
include $(APPSDIR)/codecs/codecs.make
include $(ROOTDIR)/lib/rbcodec/rbcodec.make
else
include $(APPSDIR)/apps.make
include $(ROOTDIR)/lib/rbcodec/rbcodec.make