summaryrefslogtreecommitdiff
path: root/uisimulator
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-07-23 21:06:03 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-07-23 21:06:03 +0000
commit865effac7e5eb78fd40cd4fc9b9adc0e883e9fc5 (patch)
tree29cc62c3ed4dff7b0eda5e1e35297ac889cf7d21 /uisimulator
parentf215562afda37249a3c629bc79f39f39cd7742e5 (diff)
downloadrockbox-865effac7e5eb78fd40cd4fc9b9adc0e883e9fc5.tar.gz
rockbox-865effac7e5eb78fd40cd4fc9b9adc0e883e9fc5.zip
Brushed up, made it more like the win32 makefile
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4928 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/x11/Makefile307
1 files changed, 97 insertions, 210 deletions
diff --git a/uisimulator/x11/Makefile b/uisimulator/x11/Makefile
index 0dc5e5505f..24bbd05353 100644
--- a/uisimulator/x11/Makefile
+++ b/uisimulator/x11/Makefile
@@ -21,41 +21,55 @@ APPDIR = ../../apps
21RECDIR = $(APPDIR)/recorder 21RECDIR = $(APPDIR)/recorder
22PLAYDIR = $(APPDIR)/player 22PLAYDIR = $(APPDIR)/player
23PLUGINDIR = $(APPDIR)/plugins 23PLUGINDIR = $(APPDIR)/plugins
24SIMCOMMON = ../common
24 25
25ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) 26ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP)
26 MACHINEDIR = $(RECDIR) 27 MACHINEDIR = $(RECDIR)
27 # not very nice to set RTC like this, but... 28 # not very nice to set config stuff like this, but...
28 RTC += -DHAVE_RTC 29 RTC += -DHAVE_RTC
29 # not very nice to set RADIO like this, but... 30 RADIO += -DHAVE_FMRADIO
30 RADIO += -DHAVE_FMRADIO
31else 31else
32 MACHINEDIR = $(PLAYDIR) 32 MACHINEDIR = $(PLAYDIR)
33endif 33endif
34 34
35PREVAPPDIR= .. 35PREVAPPDIR= ..
36FIRMWAREDIR = ../../firmware 36FIRMWAREDIR = ../../firmware
37COMMON = $(FIRMWAREDIR)/common 37
38SIMCOMMON = ../common 38# build some sources from these dirs
39DRIVERS = $(FIRMWAREDIR)/drivers 39DRIVERS = $(FIRMWAREDIR)/drivers
40COMMON = $(FIRMWAREDIR)/common
41
42# include here:
43EXPORT = $(FIRMWAREDIR)/export
40TOOLSDIR = ../../tools 44TOOLSDIR = ../../tools
41DOCSDIR = ../../docs 45DOCSDIR = ../../docs
42 46
43CC = gcc
44RM = rm -f 47RM = rm -f
45DEBUG = -g 48DEBUG = -g
46 49
47# where to put all output files 50ifndef OBJDIR
48OBJDIR = . 51no_configure:
52 @echo "Don't run make here. Run the tools/configure script from your own build"
53 @echo "directory, then run make there."
54 @echo
55 @echo "More help on how to build rockbox can be found here:"
56 @echo "http://rockbox.haxx.se/docs/how_to_compile.html"
57endif
49 58
50TARGET = $(OBJDIR)/rockboxui
51LANGUAGE = english 59LANGUAGE = english
52 60
53DEFINES = -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \ 61TARGET = $(OBJDIR)/rockboxui
54$(KEYPAD) $(DISPLAY) $(EXTRA_DEFINES) $(RTC) $(RADIO) 62
63DEFINES = -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \
64$(KEYPAD) $(DISPLAY) -DAPPSVERSION=\"$(VERSION)\" $(EXTRA_DEFINES) \
65$(RTC) $(RADIO)
55 66
56# Use this for simulator-only files 67# Use this for simulator-only files
57INCLUDES = -I. -I$(DRIVERS) -I$(FIRMWAREDIR)/export -I$(APPDIR) \ 68INCLUDES = -I. -I$(EXPORT) -I$(APPDIR) -I$(MACHINEDIR) -I$(SIMCOMMON) -I$(OBJDIR) -I$(PLUGINDIR)/lib
58-I$(MACHINEDIR) -I$(SIMCOMMON) -I$(OBJDIR) 69
70# The true Rockbox Applications should use this include path:
71APPINCLUDES = $(INCLUDES)
72
59SRCDIRS = . $(DRIVERS) $(FIRMWAREDIR)/export $(APPDIR) $(MACHINEDIR) 73SRCDIRS = . $(DRIVERS) $(FIRMWAREDIR)/export $(APPDIR) $(MACHINEDIR)
60 74
61# The true Rockbox Applications should use this include path: 75# The true Rockbox Applications should use this include path:
@@ -63,6 +77,10 @@ APPINCLUDES = $(INCLUDES)
63 77
64LIBS = -lpthread 78LIBS = -lpthread
65 79
80CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) -W -Wall
81
82APPCFLAGS = $(DEBUG) $(DEFINES) $(APPINCLUDES) -W -Wall
83
66UNAME := $(shell uname|sed -e "s/CYGWIN.*/CYGWIN/") 84UNAME := $(shell uname|sed -e "s/CYGWIN.*/CYGWIN/")
67ifeq ($(UNAME),Linux) 85ifeq ($(UNAME),Linux)
68 LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl -ldl 86 LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl -ldl
@@ -90,17 +108,6 @@ endif
90endif 108endif
91endif 109endif
92 110
93CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) -W -Wall
94
95APPCFLAGS = $(DEBUG) $(DEFINES) -DAPPSVERSION=\"$(VERSION)\" $(APPINCLUDES) -W -Wall
96
97ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP)
98 LCDSRSC = lcd-recorder.c sysfont.c font.c
99else
100 LCDSRSC = lcd-playersim.c lcd-player.c font-player.c lcd-player-charset.c
101endif
102COMMONSRCS = io.c
103
104ifeq ($(HAVE_MPEG_PLAY),1) 111ifeq ($(HAVE_MPEG_PLAY),1)
105 SOUNDSRC = mpegplay.c oss_sound.c 112 SOUNDSRC = mpegplay.c oss_sound.c
106 LDFLAGS += $(SOUND_LDFLAGS) 113 LDFLAGS += $(SOUND_LDFLAGS)
@@ -109,122 +116,61 @@ else
109 SOUNDSRC = 116 SOUNDSRC =
110endif 117endif
111 118
112FIRMSRCS = $(LCDSRSC) id3.c debug.c usb.c mpeg.c mp3_playback.c power.c\ 119ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP)
113 powermgmt.c panic.c mp3data.c sprintf.c buffer.c timefuncs.c 120 LCDSRSC = lcd-recorder.c sysfont.c font.c
121else
122 LCDSRSC = lcd-playersim.c lcd-player.c lcd-player-charset.c font-player.c
123endif
124COMMONSRCS = io.c stubs.c lcd-common.c sim_icons.c fmradio.c
114 125
115APPS = main.c tree.c menu.c credits.c main_menu.c language.c\ 126FIRMSRCS = $(LCDSRSC) id3.c mp3data.c usb.c mpeg.c mp3_playback.c \
116 playlist.c wps.c wps-display.c settings.c status.c icons.c\ 127 powermgmt.c power.c sprintf.c buffer.c strtok.c random.c \
117 screens.c peakmeter.c sleeptimer.c keyboard.c onplay.c\ 128 timefuncs.c panic.c debug.c
118 misc.c plugin.c playlist_viewer.c bookmark.c filetypes.c
119 129
120MENUS = settings_menu.c sound_menu.c playlist_menu.c 130APPS = main.c tree.c menu.c credits.c main_menu.c icons.c language.c \
131 playlist.c wps.c wps-display.c settings.c status.c \
132 screens.c sleeptimer.c keyboard.c onplay.c\
133 misc.c plugin.c playlist_viewer.c bookmark.c filetypes.c \
134 settings_menu.c sound_menu.c playlist_menu.c
121 135
122ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) 136ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP)
123 APPS += bmp.c widgets.c radio.c 137 APPS += peakmeter.c bmp.c widgets.c radio.c
124endif 138endif
125 139
126SRCS = screenhack.c uibasic.c resources.c visual.c lcd-x11.c stubs.c \ 140SRCS = screenhack.c uibasic.c resources.c visual.c lcd-x11.c \
127 button-x11.c thread.c sim_icons.c $(APPS) $(MENUS) $(FIRMSRCS) \ 141 button-x11.c thread.c $(APPS) $(MENUS) $(FIRMSRCS) \
128 $(COMMONSRCS) $(SOUNDSRC) lcd-common.c fmradio.c 142 $(COMMONSRCS) $(SOUNDSRC)
129
130ROCKSRC := $(wildcard $(APPDIR)/plugins/*.c)
131ROCKS := $(ROCKSRC:$(APPDIR)/plugins/%.c=$(OBJDIR)/%.rock)
132 143
133OBJS := $(OBJDIR)/lang.o $(SRCS:%.c=$(OBJDIR)/%.o) 144OBJS := $(OBJDIR)/lang.o $(SRCS:%.c=$(OBJDIR)/%.o)
134 145
135all: $(TOOLSDIR)/convbdf $(TARGET) $(EXTRA_TARGETS) $(ROCKS) 146ROCKS := $(patsubst $(PLUGINDIR)/%.c,$(OBJDIR)/%.rock,$(wildcard $(PLUGINDIR)/*.c))
147PLUGINLIBOBJS := $(patsubst $(PLUGINDIR)/lib/%.c,$(OBJDIR)/%.o,$(wildcard $(PLUGINDIR)/lib/*.c))
148
149all: $(TOOLSDIR)/convbdf $(TARGET) $(ROCKS)
150
151$(ROCKS): $(OBJDIR)/libplugin.a
136 152
137$(TOOLSDIR)/convbdf: 153$(TOOLSDIR)/convbdf:
138 $(MAKE) -C $(TOOLSDIR) 154 $(MAKE) -C $(TOOLSDIR)
139 155
140$(OBJDIR)/libplugin.a:
141 $(MAKE) -C $(PLUGINDIR)/lib DEBUG=$(DEBUG) OBJDIR=$(OBJDIR) VERSION=$(VERSION) EXTRA_DEFINES="$(EXTRA_DEFINES)" SIMULATOR=1
142
143clean: 156clean:
144 $(RM) $(OBJS) *~ core $(TARGET) $(CLIENTS) $(OBJDIR)/lang.[cho] \ 157 $(RM) $(OBJS) *~ core $(TARGET) $(CLIENTS) $(OBJDIR)/lang.[cho] \
145 $(OBJDIR)/build.lang $(OBJDIR)/*.o $(OBJDIR)/sysfont.c \ 158 $(OBJDIR)/build.lang $(OBJDIR)/*.o $(OBJDIR)/sysfont.c \
146 $(ROCKS) $(OBJDIR)/credits.raw 159 $(ROCKS) $(OBJDIR)/credits.raw
147 $(RM) -r $(DEPS) 160 $(RM) -r $(DEPS)
148 $(RM) -f $(OBJDIR)/libplugin.a $(OBJDIR)/rockbox.zip 161 $(RM) -f $(OBJDIR)/libplugin.a $(OBJDIR)/rockbox.zip
149 162
150$(OBJDIR)/%.rock: $(APPDIR)/plugins/%.c $(APPDIR)/plugin.h 163################## Specific dependencies ##################
151 $(CC) $(APPCFLAGS) -DPLUGIN -L$(OBJDIR) -lplugin -shared $< -o $@
152
153distclean: clean
154 $(RM) config.cache
155
156$(OBJDIR)/credits.raw: $(DOCSDIR)/CREDITS 164$(OBJDIR)/credits.raw: $(DOCSDIR)/CREDITS
157 perl $(APPDIR)/credits.pl < $< > $@ 165 perl $(APPDIR)/credits.pl < $< > $@
158 166
159$(OBJDIR)/credits.o: $(APPDIR)/credits.c $(APPDIR)/credits.h $(OBJDIR)/credits.raw 167$(OBJDIR)/uisw32-res.o: uisw32.rc
160 $(CC) $(APPCFLAGS) -c $< -o $@ 168 $(WINDRES) -i $< -o $@
161 169
162$(OBJDIR)/filetypes.o: $(APPDIR)/filetypes.c 170$(OBJDIR)/credits.o: $(APPDIR)/credits.c $(APPDIR)/credits.h $(OBJDIR)/credits.raw
163 $(CC) $(APPCFLAGS) -c $< -o $@
164
165$(OBJDIR)/menu.o: $(APPDIR)/menu.c
166 $(CC) $(APPCFLAGS) -c $< -o $@
167
168$(OBJDIR)/main_menu.o: $(APPDIR)/main_menu.c
169 $(CC) $(APPCFLAGS) -c $< -o $@
170 171
172$(OBJDIR)/thread.o: ./thread.c
171$(OBJDIR)/plugin.o: $(APPDIR)/plugin.c 173$(OBJDIR)/plugin.o: $(APPDIR)/plugin.c
172 $(CC) $(APPCFLAGS) -c $< -o $@
173
174$(OBJDIR)/keyboard.o: $(MACHINEDIR)/keyboard.c
175 $(CC) $(APPCFLAGS) -c $< -o $@
176
177$(OBJDIR)/language.o: $(APPDIR)/language.c
178 $(CC) $(APPCFLAGS) -c $< -o $@
179
180$(OBJDIR)/sound_menu.o: $(APPDIR)/sound_menu.c
181 $(CC) $(APPCFLAGS) -c $< -o $@
182
183$(OBJDIR)/settings_menu.o: $(APPDIR)/settings_menu.c
184 $(CC) $(APPCFLAGS) -c $< -o $@
185
186$(OBJDIR)/playlist_menu.o: $(APPDIR)/playlist_menu.c
187 $(CC) $(APPCFLAGS) -c $< -o $@
188
189$(OBJDIR)/icons.o: $(MACHINEDIR)/icons.c
190 $(CC) $(APPCFLAGS) -c $< -o $@
191
192$(OBJDIR)/widgets.o: $(RECDIR)/widgets.c
193 $(CC) $(APPCFLAGS) -c $< -o $@
194
195$(OBJDIR)/main.o: $(APPDIR)/main.c
196 $(CC) $(APPCFLAGS) -c $< -o $@
197
198$(OBJDIR)/misc.o: $(APPDIR)/misc.c
199 $(CC) $(APPCFLAGS) -c $< -o $@
200
201$(OBJDIR)/wps.o: $(APPDIR)/wps.c
202 $(CC) $(APPCFLAGS) -c $< -o $@
203
204$(OBJDIR)/sleeptimer.o: $(APPDIR)/sleeptimer.c
205 $(CC) $(APPCFLAGS) -c $< -o $@
206
207$(OBJDIR)/wps-display.o: $(APPDIR)/wps-display.c
208 $(CC) $(APPCFLAGS) -c $< -o $@
209
210$(OBJDIR)/bmp.o: $(RECDIR)/bmp.c
211 $(CC) $(APPCFLAGS) -c $< -o $@
212
213$(OBJDIR)/tree.o: $(APPDIR)/tree.c
214 $(CC) $(APPCFLAGS) -c $< -o $@
215
216$(OBJDIR)/onplay.o: $(APPDIR)/onplay.c
217 $(CC) $(APPCFLAGS) -c $< -o $@
218
219$(OBJDIR)/playlist.o: $(APPDIR)/playlist.c
220 $(CC) $(APPCFLAGS) -c $< -o $@
221
222$(OBJDIR)/playlist_viewer.o: $(APPDIR)/playlist_viewer.c
223 $(CC) $(APPCFLAGS) -c $< -o $@
224
225$(OBJDIR)/bookmark.o: $(APPDIR)/bookmark.c
226 $(CC) $(APPCFLAGS) -c $< -o $@
227
228$(OBJDIR)/build.lang: $(APPDIR)/lang/$(LANGUAGE).lang 174$(OBJDIR)/build.lang: $(APPDIR)/lang/$(LANGUAGE).lang
229 perl $(TOOLSDIR)/uplang $(APPDIR)/lang/english.lang $< > $@ 175 perl $(TOOLSDIR)/uplang $(APPDIR)/lang/english.lang $< > $@
230 176
@@ -232,105 +178,59 @@ $(OBJDIR)/lang.o: $(OBJDIR)/build.lang
232 perl -s $(TOOLSDIR)/genlang -p=$(OBJDIR)/lang $< 178 perl -s $(TOOLSDIR)/genlang -p=$(OBJDIR)/lang $<
233 $(CC) $(CFLAGS) -c $(OBJDIR)/lang.c -o $@ 179 $(CC) $(CFLAGS) -c $(OBJDIR)/lang.c -o $@
234 180
235$(OBJDIR)/lcd-recorder.o: $(DRIVERS)/lcd-recorder.c
236 $(CC) $(CFLAGS) -DHAVE_LCD_BITMAP -c $< -o $@
237
238$(OBJDIR)/sysfont.o: $(FIRMWAREDIR)/fonts/clR6x8.bdf 181$(OBJDIR)/sysfont.o: $(FIRMWAREDIR)/fonts/clR6x8.bdf
239 $(TOOLSDIR)/convbdf -c -o $(OBJDIR)/sysfont.c $< 182 $(TOOLSDIR)/convbdf -c -o $(OBJDIR)/sysfont.c $<
240 $(CC) $(APPCFLAGS) -c $(OBJDIR)/sysfont.c -o $@ 183 $(CC) $(APPCFLAGS) -c $(OBJDIR)/sysfont.c -o $@
241 184
242$(OBJDIR)/font.o: $(FIRMWAREDIR)/font.c 185################## Plugins ##################
243 $(CC) $(APPCFLAGS) -c $< -o $@ 186$(OBJDIR)/libplugin.a: $(PLUGINLIBOBJS)
187 $(AR) ruv $@ $+
244 188
245$(OBJDIR)/settings.o: $(APPDIR)/settings.c 189$(OBJDIR)/%.o: $(PLUGINDIR)/lib/%.c
246 $(CC) $(APPCFLAGS) -c $< -o $@ 190 $(CC) $(CFLAGS) -DPLUGIN -c $< -o $@
247 191
248$(OBJDIR)/status.o: $(APPDIR)/status.c 192$(OBJDIR)/%.rock: $(APPDIR)/plugins/%.c $(APPDIR)/plugin.h
249 $(CC) $(APPCFLAGS) -c $< -o $@ 193 $(CC) $(APPCFLAGS) -DPLUGIN -L$(OBJDIR) -lplugin -shared $< -o $@
250 194
251$(OBJDIR)/screens.o: $(APPDIR)/screens.c 195################## Patterns for building objects ##################
252 $(CC) $(APPCFLAGS) -c $< -o $@ 196$(OBJDIR)/%.o: ../x11/%.c
197 echo x11
198 $(CC) $(CFLAGS) -c $< -o $@
253 199
254$(OBJDIR)/peakmeter.o: $(RECDIR)/peakmeter.c 200$(OBJDIR)/%.o: $(SIMCOMMON)/%.c
201 echo simcommon
255 $(CC) $(APPCFLAGS) -c $< -o $@ 202 $(CC) $(APPCFLAGS) -c $< -o $@
256 203
257$(OBJDIR)/id3.o: $(FIRMWAREDIR)/id3.c 204$(OBJDIR)/%.o: $(MACHINEDIR)/%.c
258 $(CC) $(APPCFLAGS) -c $< -o $@ 205 $(CC) $(APPCFLAGS) -c $< -o $@
259 206
260$(OBJDIR)/mp3data.o: $(FIRMWAREDIR)/mp3data.c 207$(OBJDIR)/%.o: $(DRIVERS)/%.c
261 $(CC) $(APPCFLAGS) -c $< -o $@ 208 $(CC) $(APPCFLAGS) -c $< -o $@
262 209
263$(OBJDIR)/debug.o: $(FIRMWAREDIR)/debug.c 210$(OBJDIR)/%.o: $(FIRMWAREDIR)/%.c
264 $(CC) $(CFLAGS) -c $< -o $@ 211 echo firmware $<
265
266$(OBJDIR)/panic.o: $(FIRMWAREDIR)/panic.c
267 $(CC) $(CFLAGS) -c $< -o $@
268
269$(OBJDIR)/mpeg.o: $(FIRMWAREDIR)/mpeg.c
270 $(CC) $(CFLAGS) -c $< -o $@
271
272$(OBJDIR)/mp3_playback.o: $(FIRMWAREDIR)/mp3_playback.c
273 $(CC) $(CFLAGS) -c $< -o $@
274
275$(OBJDIR)/sprintf.o: $(COMMON)/sprintf.c
276 $(CC) $(CFLAGS) -c $< -o $@
277
278$(OBJDIR)/lcd-common.o: $(SIMCOMMON)/lcd-common.c
279 $(CC) $(CFLAGS) -c $< -o $@
280
281$(OBJDIR)/buffer.o: $(FIRMWAREDIR)/buffer.c
282 $(CC) $(CFLAGS) -c $< -o $@
283
284$(OBJDIR)/ctype.o: $(COMMON)/ctype.c
285 $(CC) $(CFLAGS) $(APPINCLUDES) -c $< -o $@
286
287$(OBJDIR)/timefuncs.o: $(COMMON)/timefuncs.c
288 $(CC) $(CFLAGS) $(APPINCLUDES) -c $< -o $@
289
290$(OBJDIR)/stubs.o: $(SIMCOMMON)/stubs.c
291 $(CC) $(APPCFLAGS) -c $< -o $@ 212 $(CC) $(APPCFLAGS) -c $< -o $@
292 213
293$(OBJDIR)/sim_icons.o: $(SIMCOMMON)/sim_icons.c 214$(OBJDIR)/%.o: $(COMMON)/%.c
294 $(CC) $(CFLAGS) -c $< -o $@ 215 $(CC) $(APPCFLAGS) -c $< -o $@
295
296$(OBJDIR)/io.o: $(SIMCOMMON)/io.c
297 $(CC) $(CFLAGS) -c $< -o $@
298
299$(OBJDIR)/usb.o: $(FIRMWAREDIR)/usb.c
300 $(CC) $(CFLAGS) -c $< -o $@
301
302$(OBJDIR)/powermgmt.o: $(FIRMWAREDIR)/powermgmt.c
303 $(CC) $(CFLAGS) -c $< -o $@
304
305$(OBJDIR)/unicode.o: $(FIRMWAREDIR)/unicode.c
306 $(CC) $(CFLAGS) -c $< -o $@
307
308$(OBJDIR)/ajf.o: $(FIRMWAREDIR)/ajf.c
309 $(CC) $(CFLAGS) -c $< -o $@
310
311$(OBJDIR)/power.o: $(DRIVERS)/power.c
312 $(CC) $(CFLAGS) -c $< -o $@
313
314$(OBJDIR)/lcd-player-charset.o: $(DRIVERS)/lcd-player-charset.c
315 $(CC) $(CFLAGS) -c $< -o $@
316
317$(OBJDIR)/lcd-playersim.o: $(SIMCOMMON)/lcd-playersim.c
318 $(CC) $(CFLAGS) -c $< -o $@
319 216
320$(OBJDIR)/fmradio.o: $(SIMCOMMON)/fmradio.c 217$(OBJDIR)/%.o: $(APPDIR)/%.c
321 $(CC) $(CFLAGS) -c $< -o $@ 218 $(CC) $(APPCFLAGS) -c $< -o $@
322 219
323$(OBJDIR)/font-player.o: $(SIMCOMMON)/font-player.c
324 $(CC) $(CFLAGS) -c $< -o $@
325 220
326$(OBJDIR)/lcd-player.o: $(DRIVERS)/lcd-player.c 221################## Auto-dependencies ##################
327 $(CC) $(CFLAGS) -c $< -o $@ 222DEPS:=$(OBJDIR)/.deps
328 223
329$(OBJDIR)/radio.o: $(RECDIR)/radio.c 224$(DEPS)/%.d: %.c
330 $(CC) $(APPCFLAGS) -c $< -o $@ 225 @$(SHELL) -c 'if [ ! -d $(DEPS) ]; then \
226 echo Creating the dependency directory: $(DEPS); \
227 mkdir -p $(DEPS); fi'
228 @echo "Updating Dependencies for $<"
229 @$(SHELL) -ec '$(CC) -MM $(CFLAGS) $< \
230 |sed '\''s|\($*\)\.o[ :]*|$(OBJDIR)/\1.o $(<:%.c=%.d) : |g'\'' > $@; \
231 [ -s $@ ] || rm -f $@'
331 232
332$(OBJDIR)/mpegplay.o: $(SIMCOMMON)/mpegplay.c 233-include $(SRCS:%.c=$(DEPS)/%.d)
333 $(CC) $(CFLAGS) -c $< -o $@
334 234
335# these ones are simulator-specific 235# these ones are simulator-specific
336 236
@@ -345,19 +245,6 @@ $(TARGET): $(OBJS) $(OBJDIR)/libplugin.a
345 $(CC) -g -o $(TARGET) $(LIBDIRS) $(LDFLAGS) $(OBJS) $(LIBS) 245 $(CC) -g -o $(TARGET) $(LIBDIRS) $(LDFLAGS) $(OBJS) $(LIBS)
346endif 246endif
347 247
348DEPS:=$(OBJDIR)/.deps
349
350$(DEPS)/%.d: %.c
351 @$(SHELL) -c 'if [ ! -d $(DEPS) ]; then \
352 echo Creating the dependency directory: $(DEPS); \
353 mkdir -p $(DEPS); fi'
354 @echo "Updating Dependencies for $<"
355 @$(SHELL) -ec '$(CC) -MM $(CFLAGS) $< \
356 |sed '\''s|\($*\)\.o[ :]*|$(OBJDIR)/\1.o $(<:%.c=%.d) : |g'\'' > $@; \
357 [ -s $@ ] || rm -f $@'
358
359-include $(SRCS:%.c=$(DEPS)/%.d)
360
361tags: 248tags:
362 @$(SHELL) -c 'for d in $(SRCDIRS); do { etags -o $(OBJDIR)/TAGS -a $$d/*.[ch]; }; done' 249 @$(SHELL) -c 'for d in $(SRCDIRS); do { etags -o $(OBJDIR)/TAGS -a $$d/*.[ch]; }; done'
363 250