summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/win32.mak135
-rw-r--r--tools/win32.mak20
2 files changed, 0 insertions, 155 deletions
diff --git a/apps/win32.mak b/apps/win32.mak
deleted file mode 100644
index 86ad2b067c..0000000000
--- a/apps/win32.mak
+++ /dev/null
@@ -1,135 +0,0 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9# Win32 GNUSH makefile by Felix Arends
10#
11
12#
13# USAGE OF THIS MAKEFILE
14#
15# call this makefile from commandline: make -f win32.mak
16#
17# to create a recorder target: make -f win32.mak RECORDER=1
18# to cerate a recorder target with propfonts: make -f win32.mak RECORDER=1 PROPFONTS=1
19# to create a recorder target without games: make -f win32.mak RECORDER=1 DISABLE_GAMES=1
20# to create a player target: make -f win32.mak PLAYER=1
21# to create an old player target: make -f win32.mak PLAYER_OLD=1
22#
23
24CC = sh-elf-gcc
25LD = sh-elf-ld
26AR = sh-elf-ar
27AS = sh-elf-as
28OC = sh-elf-objcopy
29
30LANGUAGE = english
31
32FIRMWARE := ../firmware
33TOOLS := ../tools
34DOCSDIR := ../docs
35
36INCLUDES= -I$(FIRMWARE)/include -I$(FIRMWARE)/export -I.
37
38# Pick a target to build for
39TARGET=-DARCHOS_RECORDER=1
40ifdef RECORDER
41 TARGET=-DARCHOS_RECORDER=1
42else
43 ifdef PLAYER
44 TARGET=-DARCHOS_PLAYER=1
45 else
46 ifdef PLAYER_OLD
47 TARGET=-DARCHOS_PLAYER_OLD=1
48 endif
49 endif
50endif
51
52# store output files in this directory:
53OBJDIR = .
54DEFINES = -DAPPSVERSION=\"CVS\"
55
56ifdef DISABLE_GAMES
57 DEFINES += -DDISABLE_GAMES
58endif
59
60ifdef PROPFONTS
61 DEFINES += -DLCD_PROPFONTS
62endif
63
64CFLAGS = -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(DEFINES)
65AFLAGS += -small -relax
66
67ifdef DEBUG
68 DEFINES += -DDEBUG
69 CFLAGS += -g
70 LDS := $(FIRMWARE)/gdb.lds
71else
72 LDS := $(FIRMWARE)/app.lds
73endif
74
75SRC := $(wildcard *.c)
76
77ifeq ($(TARGET),-DARCHOS_RECORDER=1)
78 SRC += $(wildcard recorder/*.c)
79 CFLAGS += -Irecorder
80 OUTNAME = ajbrec.ajz
81else
82 SRC += $(wildcard player/*.c)
83 CFLAGS += -Iplayer
84 OUTNAME = archos.mod
85endif
86
87OBJS := $(OBJDIR)/lang.o $(SRC:%.c=$(OBJDIR)/%.o)
88
89all : $(OBJDIR)/$(OUTNAME)
90
91$(OBJDIR)/librockbox.a:
92 make -C $(FIRMWARE) -f win32.mak TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) PLAYER=$(PLAYER) PLAYER_OLD=$(PLAYER_OLD)
93
94$(OBJDIR)/archos.elf : $(OBJS) $(LDS) $(OBJDIR)/librockbox.a
95 $(CC) -Os -nostdlib -o $(OBJDIR)/archos.elf $(OBJS) -L$(OBJDIR) -lrockbox -lgcc -L$(FIRMWARE) -T$(LDS) -Wl,-Map,$(OBJDIR)/archos.map
96
97$(OBJDIR)/archos.bin : $(OBJDIR)/archos.elf
98 $(OC) -O binary $(OBJDIR)/archos.elf $(OBJDIR)/archos.bin
99
100$(OBJDIR)/archos.asm: $(OBJDIR)/archos.bin
101 ../tools/sh2d -sh1 $(OBJDIR)/archos.bin > $(OBJDIR)/archos.asm
102
103$(OBJDIR)/$(OUTNAME) : $(OBJDIR)/archos.bin
104 $(TOOLS)/scramble $(OBJDIR)/archos.bin $(OBJDIR)/$(OUTNAME)
105
106$(OBJDIR)/credits.raw: $(DOCSDIR)/CREDITS
107 perl credits.pl < $< > $(OBJDIR)/$@
108
109$(OBJDIR)/credits.o: $(OBJDIR)/credits.c $(OBJDIR)/credits.h $(OBJDIR)/credits.raw
110 $(CC) $(CFLAGS) -c $< -o $@
111
112$(OBJDIR)/%.o: %.c
113 $(CC) $(CFLAGS) $(TARGET) -c $< -o $@
114
115$(OBJDIR)/build.lang: lang/$(LANGUAGE).lang
116 perl ../tools/uplang lang/english.lang $< > $@
117
118$(OBJDIR)/lang.o: $(OBJDIR)/build.lang
119 perl -s ../tools/genlang -p=$(OBJDIR)/lang $<
120 $(CC) $(CFLAGS) -c $(OBJDIR)/lang.c -o $@
121
122dist:
123 tar czvf dist.tar.gz Makefile main.c start.s app.lds
124
125clean:
126 -rm -f $(OBJS) $(OBJDIR)/$(OUTNAME) $(OBJDIR)/archos.asm \
127 $(OBJDIR)/archos.bin $(OBJDIR)/archos.elf $(OBJDIR)/archos.map \
128 $(OBJDIR)/build.lang $(OBJDIR)/lang.c $(OBJDIR)/lang.h \
129 $(OBJDIR)/credits.raw
130 make -C $(FIRMWARE) -f win32.mak TARGET=$(TARGET) DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) clean
131
132DEPS:=.deps
133DEPDIRS:=$(DEPS) $(DEPS)/recorder
134
135-include $(SRC:%.c=$(OBJDIR)/$(DEPS)/%.d)
diff --git a/tools/win32.mak b/tools/win32.mak
deleted file mode 100644
index 20b0525353..0000000000
--- a/tools/win32.mak
+++ /dev/null
@@ -1,20 +0,0 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9CFLAGS =
10
11TARGETS = scramble.exe descramble.exe sh2d.exe convbdf.exe
12
13all: $(TARGETS)
14
15$(OBJDIR)/%.exe: %.c
16 $(CC) $(CFLAGS) -c $< -o $@
17
18clean:
19 del $(TARGETS) *.obj
20