diff options
author | Felix Arends <edx@rockbox.org> | 2002-09-07 19:49:49 +0000 |
---|---|---|
committer | Felix Arends <edx@rockbox.org> | 2002-09-07 19:49:49 +0000 |
commit | a0f32d50eac3ebc23106ec9efa3010cca53a9fd8 (patch) | |
tree | e8aaaf57f0a5367272e9bcb6e01b80de2fa071d3 /apps | |
parent | f77b810d2e82de65792f550fab2e8bee6b2b95be (diff) | |
download | rockbox-a0f32d50eac3ebc23106ec9efa3010cca53a9fd8.tar.gz rockbox-a0f32d50eac3ebc23106ec9efa3010cca53a9fd8.zip |
a new apps makefile for windows (GNUSH) supporting DISABLE_GAMES and different targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2229 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/win32.mak | 60 |
1 files changed, 45 insertions, 15 deletions
diff --git a/apps/win32.mak b/apps/win32.mak index ce48e95928..f2f52947e2 100644 --- a/apps/win32.mak +++ b/apps/win32.mak @@ -6,6 +6,20 @@ # \/ \/ \/ \/ \/ # $Id$ # +# Win32 GNUSH makefile by Felix Arends +# + +# +# USAGE OF THIS MAKEFILE +# +# call this makefile from commandline: make -f win32.mak +# +# to create a recorder target: make -f win32.mak RECORDER=1 +# to cerate a recorder target with propfonts: make -f win32.mak RECORDER=1 PROPFONTS=1 +# to create a recorder target without games: make -f win32.mak RECORDER=1 DISABLE_GAMES=1 +# to create a player target: make -f win32.mak PLAYER=1 +# to create an old player target: make -f win32.mak PLAYER_OLD=1 +# CC = sh-elf-gcc LD = sh-elf-ld @@ -15,41 +29,56 @@ OC = sh-elf-objcopy FIRMWARE := ../firmware -INCLUDES= -I$(FIRMWARE)/include -I$(FIRMWARE) -I$(FIRMWARE)/common -I$(FIRMWARE)/drivers -I$(FIRMWARE)/malloc -I./recorder -I. +INCLUDES= -I$(FIRMWARE)/include -I$(FIRMWARE) -I$(FIRMWARE)/common -I$(FIRMWARE)/drivers -I$(FIRMWARE)/malloc -I. # Pick a target to build for -#TARGET = -DARCHOS_PLAYER=1 -#TARGET = -DARCHOS_PLAYER_OLD=1 -TARGET = -DARCHOS_RECORDER=1 +TARGET = -DARCHOS_RECORDER=1 # standard setting +ifdef RECORDER + TARGET=-DARCHOS_RECORDER=1 +else + ifdef PLAYER + TARGET=-DARCHOS_PLAYER=1 + else + ifdef PLAYER_OLD + TARGET=-DARCHOS_PLAYER_OLD=1 + endif + endif +endif # store output files in this directory: OBJDIR = . -DEFINES = -DLCD_PROPFONTS -DAPPSVERSION=\"CVS\" +DEFINES = -DAPPSVERSION=\"CVS\" + +ifdef DISABLE_GAMES + DEFINES += -DDISABLE_GAMES +endif + +ifdef PROPFONTS + DEFINES += -DLCD_PROPFONTS +endif CFLAGS = -O -W -Wall -m1 -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(TARGET) $(DEFINES) AFLAGS += -small -relax ifdef DEBUG - DEFINES := -DDEBUG + DEFINES += -DDEBUG CFLAGS += -g LDS := $(FIRMWARE)/gdb.lds else -#ifeq ($(TARGET),-DARCHOS_RECORDER) LDS := $(FIRMWARE)/app.lds -#else -# LDS := $(FIRMWARE)/player.lds -#endif endif SRC := $(wildcard *.c) -#ifeq ($(TARGET),-DARCHOS_RECORDER) +ifeq ($(TARGET),-DARCHOS_RECORDER=1) SRC += $(wildcard recorder/*.c) CFLAGS += -Irecorder OUTNAME = ajbrec.ajz -#else -# OUTNAME = archos.mod -#endif +else + SRC += $(wildcard player/*.c) + CFLAGS += -Iplayer + OUTNAME = archos.mod +endif OBJS := $(SRC:%.c=$(OBJDIR)/%.o) @@ -71,7 +100,7 @@ $(OBJDIR)/$(OUTNAME) : $(OBJDIR)/archos.bin scramble $(OBJDIR)/archos.bin $(OBJDIR)/$(OUTNAME) $(OBJDIR)/%.o: %.c - $(CC) $(CFLAGS) -c $< -o $@ + $(CC) $(CFLAGS) $(TARGET) -c $< -o $@ dist: tar czvf dist.tar.gz Makefile main.c start.s app.lds @@ -80,6 +109,7 @@ clean: -rm -f $(OBJS) $(OBJDIR)/$(OUTNAME) $(OBJDIR)/archos.asm \ $(OBJDIR)/archos.bin $(OBJDIR)/archos.elf $(OBJDIR)/archos.map -$(RM) -r $(OBJDIR)/$(DEPS) + make -f ../firmware/win32.mak clean DEPS:=.deps DEPDIRS:=$(DEPS) $(DEPS)/recorder |