diff options
Diffstat (limited to 'uisimulator/win32/Makefile')
-rw-r--r-- | uisimulator/win32/Makefile | 205 |
1 files changed, 205 insertions, 0 deletions
diff --git a/uisimulator/win32/Makefile b/uisimulator/win32/Makefile new file mode 100644 index 0000000000..73ee6b751f --- /dev/null +++ b/uisimulator/win32/Makefile | |||
@@ -0,0 +1,205 @@ | |||
1 | ############################################################################ | ||
2 | # __________ __ ___. | ||
3 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | # \/ \/ \/ \/ \/ | ||
8 | # $Id$ | ||
9 | # | ||
10 | # Copyright (C) 2002 by Daniel Stenberg <daniel@haxx.se> | ||
11 | # | ||
12 | # All files in this archive are subject to the GNU General Public License. | ||
13 | # See the file COPYING in the source tree root for full license agreement. | ||
14 | # | ||
15 | # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | # KIND, either express or implied. | ||
17 | # | ||
18 | ############################################################################ | ||
19 | |||
20 | APPDIR = ../../apps | ||
21 | RECDIR = $(APPDIR)/recorder | ||
22 | |||
23 | PREVAPPDIR= .. | ||
24 | FIRMWAREDIR = ../../firmware | ||
25 | DRIVERS = $(FIRMWAREDIR)/drivers | ||
26 | COMMON = $(FIRMWAREDIR)/common | ||
27 | LIBMADDIR = $(PREVAPPDIR)/common/libmad | ||
28 | |||
29 | CC = i386-mingw32msvc-gcc | ||
30 | WINDRES = i386-mingw32msvc-windres | ||
31 | RM = rm -f | ||
32 | DEBUG = -g | ||
33 | |||
34 | # where to put all output files | ||
35 | OBJDIR = . | ||
36 | |||
37 | TARGET = $(OBJDIR)/rockboxui | ||
38 | |||
39 | #DISPLAY = -DHAVE_LCD_CHARCELLS | ||
40 | DISPLAY = -DHAVE_LCD_BITMAP | ||
41 | |||
42 | #KEYPAD = -DHAVE_PLAYER_KEYPAD | ||
43 | KEYPAD = -DHAVE_RECORDER_KEYPAD | ||
44 | |||
45 | DEFINES = -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \ | ||
46 | $(KEYPAD) $(DISPLAY) -DAPPSVERSION=\"$(VERSION)\" | ||
47 | |||
48 | LDFLAGS = -lgdi32 -luser32 | ||
49 | |||
50 | # Use this for simulator-only files | ||
51 | INCLUDES = -I. -I$(DRIVERS) -I$(COMMON) -I$(FIRMWAREDIR) -I$(APPDIR) -I$(RECDIR) | ||
52 | |||
53 | # The true Rockbox Applications should use this include path: | ||
54 | APPINCLUDES = -I$(FIRMWAREDIR)/include $(INCLUDES) | ||
55 | |||
56 | DEFINES += -DWIN32 | ||
57 | |||
58 | CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) -W -Wall | ||
59 | |||
60 | APPCFLAGS = $(DEBUG) $(DEFINES) $(APPINCLUDES) -W -Wall | ||
61 | |||
62 | FIRMSRCS = chartables.c lcd.c power.c sprintf.c id3.c backlight.c usb.c \ | ||
63 | mpeg.c | ||
64 | |||
65 | APPS = main.c tree.c menu.c credits.c main_menu.c\ | ||
66 | playlist.c showtext.c wps.c settings.c status.c | ||
67 | |||
68 | MENUS = games_menu.c screensavers_menu.c settings_menu.c sound_menu.c | ||
69 | |||
70 | ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) | ||
71 | APPS += tetris.c sokoban.c bounce.c boxes.c icons.c bmp.c | ||
72 | endif | ||
73 | |||
74 | SRCS = button.c dir-win32.c lcd-win32.c panic-win32.c thread-win32.c \ | ||
75 | debug-win32.c kernel.c string-win32.c uisw32.c \ | ||
76 | $(APPS) $(MENUS) $(FIRMSRCS) strtok.c | ||
77 | |||
78 | OBJS := $(SRCS:%.c=$(OBJDIR)/%.o) | ||
79 | |||
80 | all: $(OBJDIR)/uisw32.exe | ||
81 | |||
82 | $(OBJDIR)/uisw32.exe: $(OBJS) $(OBJDIR)/uisw32-res.o | ||
83 | $(CC) $(OBJS) $(OBJDIR)/uisw32-res.o -o $(OBJDIR)/uisw32.exe $(LDFLAGS) | ||
84 | |||
85 | $(OBJDIR)/uisw32-res.o: uisw32.rc | ||
86 | $(WINDRES) -i $< -o $@ | ||
87 | |||
88 | clean: | ||
89 | $(RM) $(OBJS) *~ core $(TARGET) $(CLIENTS) | ||
90 | $(RM) -r $(DEPS) | ||
91 | |||
92 | distclean: clean | ||
93 | $(RM) config.cache | ||
94 | |||
95 | $(OBJDIR)/credits.o: $(APPDIR)/credits.c | ||
96 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
97 | |||
98 | $(OBJDIR)/menu.o: $(APPDIR)/menu.c | ||
99 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
100 | |||
101 | $(OBJDIR)/main_menu.o: $(APPDIR)/main_menu.c | ||
102 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
103 | |||
104 | $(OBJDIR)/sound_menu.o: $(APPDIR)/sound_menu.c | ||
105 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
106 | |||
107 | $(OBJDIR)/games_menu.o: $(APPDIR)/games_menu.c | ||
108 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
109 | |||
110 | $(OBJDIR)/screensavers_menu.o: $(APPDIR)/screensavers_menu.c | ||
111 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
112 | |||
113 | $(OBJDIR)/settings_menu.o: $(APPDIR)/settings_menu.c | ||
114 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
115 | |||
116 | $(OBJDIR)/icons.o: $(RECDIR)/icons.c | ||
117 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
118 | |||
119 | $(OBJDIR)/tetris.o: $(RECDIR)/tetris.c | ||
120 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
121 | |||
122 | $(OBJDIR)/sokoban.o: $(RECDIR)/sokoban.c | ||
123 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
124 | |||
125 | $(OBJDIR)/bounce.o: $(RECDIR)/bounce.c | ||
126 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
127 | |||
128 | $(OBJDIR)/boxes.o: $(RECDIR)/boxes.c | ||
129 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
130 | |||
131 | $(OBJDIR)/main.o: $(APPDIR)/main.c | ||
132 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
133 | |||
134 | $(OBJDIR)/wps.o: $(APPDIR)/wps.c | ||
135 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
136 | |||
137 | $(OBJDIR)/bmp.o: $(RECDIR)/bmp.c | ||
138 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
139 | |||
140 | $(OBJDIR)/tree.o: $(APPDIR)/tree.c | ||
141 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
142 | |||
143 | $(OBJDIR)/playlist.o: $(APPDIR)/playlist.c | ||
144 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
145 | |||
146 | $(OBJDIR)/showtext.o: $(APPDIR)/showtext.c | ||
147 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
148 | |||
149 | $(OBJDIR)/lcd.o: $(DRIVERS)/lcd.c | ||
150 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
151 | |||
152 | $(OBJDIR)/power.o: $(DRIVERS)/power.c | ||
153 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
154 | |||
155 | $(OBJDIR)/chartables.o: $(FIRMWAREDIR)/chartables.c | ||
156 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
157 | |||
158 | $(OBJDIR)/usb.o: $(FIRMWAREDIR)/usb.c | ||
159 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
160 | |||
161 | $(OBJDIR)/settings.o: $(APPDIR)/settings.c | ||
162 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
163 | |||
164 | $(OBJDIR)/id3.o: $(FIRMWAREDIR)/id3.c | ||
165 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
166 | |||
167 | $(OBJDIR)/status.o: $(APPDIR)/status.c | ||
168 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
169 | |||
170 | $(OBJDIR)/debug.o: $(FIRMWAREDIR)/debug.c | ||
171 | $(CC) $(CFLAGS) -c $< -o $@ | ||
172 | |||
173 | $(OBJDIR)/mpeg.o: $(FIRMWAREDIR)/mpeg.c | ||
174 | $(CC) $(CFLAGS) -c $< -o $@ | ||
175 | |||
176 | $(OBJDIR)/sprintf.o: $(COMMON)/sprintf.c | ||
177 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
178 | |||
179 | $(OBJDIR)/strtok.o: $(COMMON)/strtok.c | ||
180 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
181 | |||
182 | $(OBJDIR)/backlight.o: $(FIRMWAREDIR)/backlight.c | ||
183 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
184 | |||
185 | |||
186 | # these ones are simulator-specific | ||
187 | |||
188 | $(OBJDIR)/%.o: %.c | ||
189 | $(CC) $(CFLAGS) -c $< -o $@ | ||
190 | |||
191 | $(TARGET): $(OBJS) | ||
192 | $(CC) -g -o $(TARGET) $(LIBDIRS) $(LDFLAGS) $(OBJS) $(LIBS) | ||
193 | |||
194 | DEPS:=$(OBJDIR)/.deps | ||
195 | |||
196 | $(DEPS)/%.d: %.c | ||
197 | @$(SHELL) -c 'if [ ! -d $(DEPS) ]; then \ | ||
198 | echo Creating the dependency directory: $(DEPS); \ | ||
199 | mkdir -p $(DEPS); fi' | ||
200 | @echo "Updating Dependencies for $<" | ||
201 | @$(SHELL) -ec '$(CC) -MM $(CFLAGS) $< \ | ||
202 | |sed '\''s|\($*\)\.o[ :]*|$(OBJDIR)/\1.o $(<:%.c=%.d) : |g'\'' > $@; \ | ||
203 | [ -s $@ ] || rm -f $@' | ||
204 | |||
205 | -include $(SRCS:%.c=$(DEPS)/%.d) | ||