From 83cb2e5daef2f13c8098cda3e6a9708a372e967c Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Tue, 27 Mar 2012 00:16:09 +0200 Subject: Fix warble and clean up/refactor Makefile. Change-Id: I8754ad8724e22147b98a156fecea599bdda72292 --- lib/rbcodec/test/warble.make | 18 +++++------------- tools/root.make | 16 ++++++++++------ 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/lib/rbcodec/test/warble.make b/lib/rbcodec/test/warble.make index 11f7ab03ec..2c1fb13889 100644 --- a/lib/rbcodec/test/warble.make +++ b/lib/rbcodec/test/warble.make @@ -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) diff --git a/tools/root.make b/tools/root.make index 032daf5a1c..e42be044fc 100644 --- a/tools/root.make +++ b/tools/root.make @@ -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 -- cgit v1.2.3