From a0f32d50eac3ebc23106ec9efa3010cca53a9fd8 Mon Sep 17 00:00:00 2001 From: Felix Arends Date: Sat, 7 Sep 2002 19:49:49 +0000 Subject: 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 --- apps/win32.mak | 60 +++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 15 deletions(-) (limited to 'apps') 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 -- cgit v1.2.3