From 07109a07d58ead326f90a60f15b8db3db7ee934f Mon Sep 17 00:00:00 2001 From: zagor Date: Tue, 1 Sep 2009 14:53:37 +0000 Subject: [PATCH] Fixed checkwps build warnings. Updated checkwps makefile to be closer to main. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22593 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/system.h | 4 ++++ tools/checkwps/checkwps.make | 38 +++++++++++++++++++------------------- tools/root.make | 7 +++++-- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/firmware/export/system.h b/firmware/export/system.h index 321694899..aa95167b8 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h @@ -121,6 +121,8 @@ int get_cpu_boost_counter(void); ptr = (typeof(ptr))tmp_ptr1; \ } +#ifndef __PCTOOL__ + /* newer? SDL includes endian.h, So we ignore it */ #ifdef SIMULATOR #undef letoh16 @@ -158,6 +160,8 @@ int get_cpu_boost_counter(void); #define swap_odd_even_le32(x) (x) #endif +#endif + /* static endianness conversion */ #define SWAP_16(x) ((typeof(x))(unsigned short)(((unsigned short)(x) >> 8) | \ ((unsigned short)(x) << 8))) diff --git a/tools/checkwps/checkwps.make b/tools/checkwps/checkwps.make index 87144453a..0a455e977 100644 --- a/tools/checkwps/checkwps.make +++ b/tools/checkwps/checkwps.make @@ -7,28 +7,28 @@ # $Id$ # -FLAGS=-g -D__PCTOOL__ -DDEBUG -DROCKBOX_DIR_LEN=9 -DWPS_DIR=\".\" +FLAGS=-g -D__PCTOOL__ -DDEBUG -DROCKBOX_DIR_LEN=9 -DWPS_DIR=\".\" $(TARGET) -COMMON = $(ROOTDIR)/apps/gui/skin_engine/wps_debug.c \ - $(ROOTDIR)/apps/gui/skin_engine/skin_parser.c \ - $(ROOTDIR)/apps/gui/skin_engine/skin_buffer.c \ - $(ROOTDIR)/apps/misc.c \ - $(ROOTDIR)/apps/recorder/bmp.c \ - $(ROOTDIR)/firmware/common/strlcpy.c +SRC = $(ROOTDIR)/apps/gui/skin_engine/wps_debug.c \ + $(ROOTDIR)/apps/gui/skin_engine/skin_parser.c \ + $(ROOTDIR)/apps/gui/skin_engine/skin_buffer.c \ + $(ROOTDIR)/apps/misc.c \ + $(ROOTDIR)/apps/recorder/bmp.c \ + $(ROOTDIR)/firmware/common/strlcpy.c \ + $(APPSDIR)/checkwps.c -INCLUDE = -I $(ROOTDIR)/apps/gui \ - -I $(ROOTDIR)/apps/gui/skin_engine \ - -I $(ROOTDIR)/firmware/export \ - -I $(ROOTDIR)/apps \ - -I $(ROOTDIR)/apps/recorder \ - -I $(APPSDIR) +INCLUDES = -I$(ROOTDIR)/apps/gui \ + -I$(ROOTDIR)/apps/gui/skin_engine \ + -I$(ROOTDIR)/firmware/export \ + -I$(ROOTDIR)/apps \ + -I$(ROOTDIR)/apps/recorder \ + -I$(APPSDIR) # Makes mkdepfile happy GCCOPTS+=-D__PCTOOL__ -SRC=$(APPSDIR)/checkwps.c $(COMMON) -OTHER_SRC=$(SRC) -ASMDEFS_SRC=$(SRC) -$(BUILDDIR)/$(BINARY): $(APPSDIR)/checkwps.c $(COMMON) - @echo CC $(BINARY) - @$(HOSTCC) $(INCLUDE) $(FLAGS) $(COMMON) $(TARGET) $(APPSDIR)/checkwps.c -o $@ +.SECONDEXPANSION: # $$(OBJ) is not populated until after this + +$(BUILDDIR)/$(BINARY): $$(OBJ) + @echo LD $(BINARY) + $(SILENT)$(HOSTCC) $(INCLUDE) $(FLAGS) -o $@ $+ diff --git a/tools/root.make b/tools/root.make index 5ba321c95..e2525dc8d 100644 --- a/tools/root.make +++ b/tools/root.make @@ -54,8 +54,11 @@ all: $(DEPFILE) build # Subdir makefiles. their primary purpose is to populate SRC, OTHER_SRC & # ASMDEFS_SRC but they also define special dependencies and compile rules include $(TOOLSDIR)/tools.make -include $(FIRMDIR)/firmware.make -include $(ROOTDIR)/apps/bitmaps/bitmaps.make + +ifeq (,$(findstring checkwps,$(APPSDIR))) + include $(FIRMDIR)/firmware.make + include $(ROOTDIR)/apps/bitmaps/bitmaps.make +endif ifneq (,$(findstring bootloader,$(APPSDIR))) include $(APPSDIR)/bootloader.make -- 2.11.4.GIT