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_DIR = $(ROOTDIR)/lib/rbcodec
RBCODEC_BLD = $(BUILDDIR)/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) 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 \
-I$(ROOTDIR)/firmware/target/hosted/sdl -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 .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): $(CODECS)
$(BUILDDIR)/$(BINARY): $$(OBJ) $(RBCODEC_LIB) $(BUILDDIR)/$(BINARY): $$(OBJ) $$(CORE_LIBS)
@echo LD $(BINARY) @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,8 +63,9 @@ all: $(DEPFILE) build
# dependencies and compile rules # dependencies and compile rules
include $(TOOLSDIR)/tools.make include $(TOOLSDIR)/tools.make
ifeq (,$(findstring checkwps,$(APPSDIR))) ifneq (,$(findstring checkwps,$(APP_TYPE)))
ifeq (,$(findstring database,$(APPSDIR))) ifneq (,$(findstring database,$(APP_TYPE)))
ifneq (,$(findstring warble,$(APP_TYPE)))
include $(FIRMDIR)/firmware.make include $(FIRMDIR)/firmware.make
include $(ROOTDIR)/apps/bitmaps/bitmaps.make include $(ROOTDIR)/apps/bitmaps/bitmaps.make
ifeq (,$(findstring bootloader,$(APPSDIR))) ifeq (,$(findstring bootloader,$(APPSDIR)))
@ -72,6 +73,7 @@ ifeq (,$(findstring checkwps,$(APPSDIR)))
endif endif
endif endif
endif endif
endif
#included before codecs.make and plugins.make so they see them) #included before codecs.make and plugins.make so they see them)
ifndef APP_TYPE ifndef APP_TYPE
@ -97,6 +99,8 @@ else ifneq (,$(findstring database,$(APP_TYPE)))
include $(APPSDIR)/database.make include $(APPSDIR)/database.make
else ifneq (,$(findstring warble,$(APP_TYPE))) else ifneq (,$(findstring warble,$(APP_TYPE)))
include $(ROOTDIR)/lib/rbcodec/test/warble.make include $(ROOTDIR)/lib/rbcodec/test/warble.make
include $(APPSDIR)/codecs/codecs.make
include $(ROOTDIR)/lib/rbcodec/rbcodec.make
else else
include $(APPSDIR)/apps.make include $(APPSDIR)/apps.make
include $(ROOTDIR)/lib/rbcodec/rbcodec.make include $(ROOTDIR)/lib/rbcodec/rbcodec.make