new SOURCES file that specifies which files to build in each dir, use

config.h preprocessor symbols to make conditionals

use the GCCOPTS now specified in the root Makefile by configure


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5158 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Stenberg 2004-10-04 13:03:33 +00:00
parent 235b50b42d
commit 9c85941786
8 changed files with 187 additions and 23 deletions

View file

@ -18,20 +18,18 @@ ifdef DEBUG
CFLAGS += -g
endif
SRC := $(wildcard *.c)
SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P -include "config.h" - )
DIRS = .
# set the ROMTARGET here
ROMTARGET := $(ARCHOSROM)
ifdef APPEXTRA
SRC += $(wildcard $(APPEXTRA)/*.c)
DIRS += $(APPEXTRA)
INCLUDES += -I$(APPEXTRA)
endif
CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes \
-fomit-frame-pointer -fschedule-insns $(INCLUDES) $(TARGET) $(DEFINES) \
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(DEFINES) \
-DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
OBJS := $(OBJDIR)/lang.o $(SRC:%.c=$(OBJDIR)/%.o)

42
apps/SOURCES Normal file
View file

@ -0,0 +1,42 @@
alarm_menu.c
bookmark.c
credits.c
debug_menu.c
filetypes.c
language.c
main.c
main_menu.c
menu.c
misc.c
onplay.c
playlist.c
playlist_menu.c
playlist_viewer.c
plugin.c
screens.c
settings.c
settings_menu.c
sleeptimer.c
sound_menu.c
status.c
talk.c
tree.c
wps-display.c
wps.c
#ifdef HAVE_LCD_CHARCELLS
player/icons.c
player/keyboard.c
#endif
#ifdef HAVE_LCD_BITMAP
recorder/bmp.c
recorder/icons.c
recorder/keyboard.c
recorder/peakmeter.c
recorder/widgets.c
#endif
#ifdef CONFIG_TUNER
recorder/radio.c
#endif
#ifdef HAVE_RECORDING
recorder/recording.c
#endif

View file

@ -9,8 +9,8 @@
INCLUDES = -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \
-I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib
CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes \
$(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} -DPLUGIN
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \
-DMEM=${MEMORYSIZE} -DPLUGIN
ifdef APPEXTRA
INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
@ -20,7 +20,8 @@ LDS := plugin.lds
LINKFILE := $(OBJDIR)/pluginlink.lds
DEPFILE = $(OBJDIR)/dep-plugins
SRC := $(wildcard *.c)
SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) \
$(INCLUDES) $(TARGET) $(DEFINES) -E -P -include "config.h" - )
ROCKS := $(SRC:%.c=$(OBJDIR)/%.rock)
SOURCES = $(SRC)
ELFS := $(SRC:%.c=$(OBJDIR)/%.elf)

41
apps/plugins/SOURCES Normal file
View file

@ -0,0 +1,41 @@
battery_test.c
bounce.c
calculator.c
calendar.c
chessclock.c
chip8.c
clock.c
cube.c
euroconverter.c
favorites.c
firmware_flash.c
flipit.c
grayscale.c
helloworld.c
jackpot.c
jpeg.c
mandelbrot.c
metronome.c
minesweeper.c
mosaique.c
nim.c
oscillograph.c
pong.c
rockblox.c
rockbox_flash.c
search.c
sliding_puzzle.c
snake.c
snake2.c
snow.c
sokoban.c
solitaire.c
sort.c
splitedit.c
star.c
stopwatch.c
vbrfix.c
video.c
viewer.c
vu_meter.c
wormlet.c

View file

@ -17,7 +17,7 @@ ifdef APPEXTRA
INCLUDES += -I$(APPSDIR)/$(APPEXTRA)
endif
CFLAGS = -W -Wall -O -m1 -nostdlib -ffreestanding -Wstrict-prototypes \
CFLAGS = $(GCCOPTS) \
$(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
ifdef DEBUG
@ -26,7 +26,7 @@ else
CFLAGS += -fomit-frame-pointer -fschedule-insns
endif
SRC := $(wildcard *.c)
SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P -include "config.h" - )
SOURCES = $(SRC)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
DEPFILE = $(OBJDIR)/dep-pluginlib

30
apps/plugins/lib/SOURCES Normal file
View file

@ -0,0 +1,30 @@
configfile.c
gray_black_display.c
gray_blockfuncs.c
gray_clear_display.c
gray_core.c
gray_deferred_update.c
gray_drawbitmap.c
gray_drawgraymap.c
gray_drawline.c
gray_drawpixel.c
gray_drawrect.c
gray_fillrect.c
gray_getstringsize.c
gray_horline.c
gray_pixelfuncs.c
gray_position_display.c
gray_putsxy.c
gray_screendump.c
gray_scroll_down.c
gray_scroll_down8.c
gray_scroll_left.c
gray_scroll_right.c
gray_scroll_up.c
gray_scroll_up8.c
gray_set_background.c
gray_set_drawinfo.c
gray_set_drawmode.c
gray_set_foreground.c
gray_setfont.c
gray_verline.c

View file

@ -9,19 +9,12 @@
INCLUDES=-Iinclude -I$(FIRMDIR) -Iexport -Icommon -Idrivers
CFLAGS = -W -Wall -O -m1 -nostdlib -ffreestanding -Wstrict-prototypes \
$(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE}
ifdef DEBUG
CFLAGS += -g -DDEBUG
else
CFLAGS += -fomit-frame-pointer -fschedule-insns
endif
SRC := $(wildcard drivers/*.c common/*.c *.c)
SRC_S := $(wildcard drivers/*.S common/*.S *.S)
SOURCES = $(SRC) $(SRC_S)
OBJS := $(SRC:%.c=$(OBJDIR)/%.o) $(SRC_S:%.S=$(OBJDIR)/%.o) $(OBJDIR)/sysfont.o
SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P -include "config.h" - )
SOURCES = $(SRC)
OBJS2 := $(patsubst %.c, $(OBJDIR)/%.o, $(SRC)) $(OBJDIR)/sysfont.o
OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DIRS:=. drivers common
OUTPUT = $(OBJDIR)/librockbox.a
DEPFILE = $(OBJDIR)/dep-firmware

59
firmware/SOURCES Normal file
View file

@ -0,0 +1,59 @@
backlight.c
buffer.c
common/atoi.c
common/ctype.c
common/dir.c
common/disk.c
common/errno.c
common/file.c
common/memcmp.c
common/qsort.c
common/random.c
common/sprintf.c
common/strcasecmp.c
common/strcat.c
common/strchr.c
common/strcmp.c
common/strcpy.c
common/strlen.c
common/strncmp.c
common/strncpy.c
common/strrchr.c
common/strtok.c
common/timefuncs.c
debug.c
drivers/adc.c
drivers/ata.c
drivers/ata_mmc.c
drivers/button.c
drivers/dac.c
drivers/fat.c
drivers/fmradio.c
drivers/i2c.c
drivers/lcd-player-charset.c
drivers/lcd-player.c
drivers/lcd-recorder.c
drivers/led.c
drivers/mas.c
drivers/power.c
drivers/rtc.c
drivers/serial.c
font.c
hwcompat.c
id3.c
kernel.c
mp3_playback.c
mp3data.c
mpeg.c
panic.c
powermgmt.c
rolo.c
system.c
thread.c
usb.c
bitswap.S
common/memcpy.S
common/memset.S
crt0.S
descramble.S
drivers/lcd.S