diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-02-18 13:47:17 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-02-18 13:47:17 +0000 |
commit | cdde25b597eb4047e9db27bb8bbcf938e4a43cfe (patch) | |
tree | d25f47817cc8515228c8ea0eb33ab71bfc2159d4 /uisimulator | |
parent | f436476f9f0eeae4640197866ea5b5fa068df7e9 (diff) |
Unified build system to use SOURCES for sim builds too, a single Makefile-look
made by configure and various related adjustments. This has not yet been tested
on cygwin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6001 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/FILES | 3 | ||||
-rw-r--r-- | uisimulator/common/Makefile | 56 | ||||
-rw-r--r-- | uisimulator/common/SOURCES | 8 | ||||
-rw-r--r-- | uisimulator/win32/Makefile | 220 | ||||
-rw-r--r-- | uisimulator/win32/SOURCES | 10 | ||||
-rw-r--r-- | uisimulator/x11/Makefile | 252 | ||||
-rw-r--r-- | uisimulator/x11/SOURCES | 10 |
7 files changed, 133 insertions, 426 deletions
diff --git a/uisimulator/FILES b/uisimulator/FILES index 5735d135dd..66ebcfec6b 100644 --- a/uisimulator/FILES +++ b/uisimulator/FILES @@ -14,3 +14,6 @@ win32/rockbox.ico x11/*.[ch] x11/Makefile x11/archos/rockbox112.bmp +common/SOURCES +win32/SOURCES +x11/SOURCES diff --git a/uisimulator/common/Makefile b/uisimulator/common/Makefile new file mode 100644 index 0000000000..b044440adf --- /dev/null +++ b/uisimulator/common/Makefile @@ -0,0 +1,56 @@ +############################################################################ +# __________ __ ___. +# Open \______ \ ____ ____ | | _\_ |__ _______ ___ +# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / +# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < +# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ +# \/ \/ \/ \/ \/ +# $Id$ +# +# Copyright (C) 2002 by Daniel Stenberg <daniel@haxx.se> +# +# All files in this archive are subject to the GNU General Public License. +# See the file COPYING in the source tree root for full license agreement. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +############################################################################ + +DEPFILE = $(OBJDIR)/dep-commonsim + +RM = rm -f +DEBUG = -g + +# Use this for simulator-only files +INCLUDES = -I. -I$(OBJDIR) -I$(FIRMDIR)/export -I$(APPSDIR) + +SRC := $(shell cat SOURCES | gcc -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ + $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - ) +OBJS := $(SRC:%.c=$(OBJDIR)/%.o) + +DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \ +$(TARGET) -DAPPSVERSION=\"$(VERSION)\" -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES) + +SOURCES = $(SRC) + +DIRS = . + +CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) $(GCCOPTS) + +OUTFILE = $(OBJDIR)/libsim.a + +all: $(OUTFILE) + +include $(TOOLSDIR)/make.inc + +clean: + @echo "cleaning commonsim" + @$(RM) $(OBJS) *~ core $(DEPFILE) + +$(OUTFILE): $(OBJS) + @echo "AR+RANLIB $@" + @$(AR) ruv $@ $(OBJS) >/dev/null 2>&1 + @$(RANLIB) $@ + +-include $(DEPFILE) diff --git a/uisimulator/common/SOURCES b/uisimulator/common/SOURCES new file mode 100644 index 0000000000..d12a78db53 --- /dev/null +++ b/uisimulator/common/SOURCES @@ -0,0 +1,8 @@ +fmradio.c +font-player.c +io.c +lcd-common.c +lcd-playersim.c +mpegplay.c +sim_icons.c +stubs.c diff --git a/uisimulator/win32/Makefile b/uisimulator/win32/Makefile index e7d118cd5a..4878d85bf1 100644 --- a/uisimulator/win32/Makefile +++ b/uisimulator/win32/Makefile @@ -17,145 +17,52 @@ # ############################################################################ -APPDIR = ../../apps -RECDIR = $(APPDIR)/recorder -PLAYDIR = $(APPDIR)/player -PLUGINDIR = $(APPDIR)/plugins SIMCOMMON = ../common -ISONDIO := $(findstring ONDIO, $(TARGET)) -ISIRIVER := $(findstring IRIVER, $(TARGET)) -ISPLAYER := $(findstring PLAYER, $(TARGET)) -ifeq ($(ISPLAYER), PLAYER) - MACHINEDIR = $(PLAYDIR) -else - MACHINEDIR = $(RECDIR) -endif - -PREVAPPDIR= .. -FIRMWAREDIR = ../../firmware - -# build some sources from these dirs -DRIVERS = $(FIRMWAREDIR)/drivers -COMMON = $(FIRMWAREDIR)/common - -# include here: -EXPORT = $(FIRMWAREDIR)/export -TOOLSDIR = ../../tools -DOCSDIR = ../../docs +DEPFILE = $(OBJDIR)/dep-simwin RM = rm -f DEBUG = -g -ifndef OBJDIR -no_configure: - @echo "Don't run make here. Run the tools/configure script from your own build" - @echo "directory, then run make there." - @echo - @echo "More help on how to build rockbox can be found here:" - @echo "http://rockbox.haxx.se/docs/how_to_compile.html" -endif +INCLUDES = -I. -I$(SIMCOMMON) -I$(OBJDIR) -I$(FIRMDIR)/export -I$(APPSDIR) DEFINES = -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \ $(TARGET) -DAPPSVERSION=\"$(VERSION)\" -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES) LDFLAGS = -lgdi32 -luser32 -# Use this for simulator-only files -INCLUDES = -I. -I$(EXPORT) -I$(APPDIR) -I$(MACHINEDIR) -I$(SIMCOMMON) -I$(OBJDIR) -I$(PLUGINDIR)/lib - -# The true Rockbox Applications should use this include path: -APPINCLUDES = $(INCLUDES) +SRC := $(shell cat SOURCES | gcc -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ + $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - ) +OBJS := $(SRC:%.c=$(OBJDIR)/%.o) -DEFINES += -DWIN32 +SOURCES = $(SRC) +DIRS = . CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) -W -Wall -mno-cygwin -APPCFLAGS = $(DEBUG) $(DEFINES) $(APPINCLUDES) -W -Wall -mno-cygwin DLLTOOLFLAGS = --export-all DLLWRAPFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 -mno-cygwin -UNAME := $(shell uname|sed -e "s/CYGWIN.*/CYGWIN/") -EXEFILE := $(OBJDIR)/rockboxui.exe - -ifeq ($(UNAME),CYGWIN) - CC = gcc - WINDRES = windres - DLLTOOL = dlltool - DLLWRAP = dllwrap - RANLIB = ranlib - DEFINES += -DNOCYGWIN - LDFLAGS += -mno-cygwin -else - CC = i386-mingw32msvc-gcc - WINDRES = i386-mingw32msvc-windres - DLLTOOL = i386-mingw32msvc-dlltool - DLLWRAP = i386-mingw32msvc-dllwrap - RANLIB = i386-mingw32msvc-ranlib - CFLAGS += -mwindows - LDFLAGS += -mwindows - APPCFLAGS += -mwindows -endif - -ifeq ($(ISPLAYER),PLAYER) - LCDSRSC = lcd-playersim.c lcd-player.c lcd-player-charset.c font-player.c -else -ifeq ($(ISIRIVER),IRIVER) - LCDSRSC = lcd-h100.c sysfont.c font.c -else - LCDSRSC = lcd-recorder.c sysfont.c font.c -endif -endif -COMMONSRCS = io.c stubs.c lcd-common.c sim_icons.c fmradio.c - -FIRMSRCS = $(LCDSRSC) id3.c mp3data.c usb.c mpeg.c mp3_playback.c \ - powermgmt.c power.c sprintf.c buffer.c strtok.c random.c \ - timefuncs.c strcasestr.c - -APPS = main.c tree.c menu.c credits.c main_menu.c icons.c language.c \ - playlist.c wps.c wps-display.c settings.c status.c \ - screens.c sleeptimer.c keyboard.c onplay.c\ - misc.c plugin.c playlist_viewer.c bookmark.c filetypes.c \ - settings_menu.c sound_menu.c playlist_menu.c filetree.c dbtree.c - -ifneq ($(ISPLAYER),PLAYER) - APPS += peakmeter.c bmp.c widgets.c radio.c -endif - -SRCS = button.c lcd-win32.c panic-win32.c thread-win32.c \ - debug-win32.c kernel.c string-win32.c uisw32.c \ - $(APPS) $(FIRMSRCS) $(COMMONSRCS) - -OBJS := $(OBJDIR)/lang.o $(SRCS:%.c=$(OBJDIR)/%.o) $(OBJDIR)/uisw32-res.o - -ifdef ENABLEDPLUGINS - ROCKS := $(patsubst $(PLUGINDIR)/%.c,$(OBJDIR)/%.rock,$(wildcard $(PLUGINDIR)/*.c)) - PLUGINLIBOBJS := $(patsubst $(PLUGINDIR)/lib/%.c,$(OBJDIR)/%.o,$(wildcard $(PLUGINDIR)/lib/*.c)) -endif - -all: $(TOOLSDIR)/convbdf $(EXEFILE) $(ROCKS) - -$(ROCKS): $(OBJDIR)/libplugin.a - -$(TOOLSDIR)/convbdf: - $(MAKE) -C $(TOOLSDIR) - -$(EXEFILE): $(OBJDIR)/lang.o $(OBJS) - @echo LD $@ - @$(CC) $(OBJS) -o $(EXEFILE) $(LDFLAGS) +OUTFILE = $(OBJDIR)/libsim.a + +all: $(OUTFILE) + @echo "MAKE in common sim" + $(MAKE) -C $(SIMCOMMON) + +include $(TOOLSDIR)/make.inc + +$(OUTFILE): $(OBJS) + @echo "AR+RANLIB $@" + @$(AR) ruv $@ $(OBJS) >/dev/null 2>&1 + @$(RANLIB) $@ clean: - $(RM) $(OBJS) *~ core $(EXEFILE) $(CLIENTS) $(OBJDIR)/uisw32-res.o \ - $(OBJDIR)/lang.[cho] $(OBJDIR)/build.lang $(OBJDIR)/*.o \ - $(OBJDIR)/*.rock $(OBJDIR)/*.def $(OBJDIR)/sysfont.c \ - $(OBJDIR)/credits.raw $(OBJDIR)/libplugin.a - $(RM) -f $(OBJDIR)/UI256.bmp - $(RM) -r $(DEPS) + @echo "cleaning simwin" + @$(RM) $(OBJS) *~ core $(OUTFILE) $(OBJDIR)/uisw32-res.o \ + $(OBJDIR)/UI256.bmp $(DEPFILE) + @$(MAKE) -C $(SIMCOMMON) clean ################## Specific dependencies ################## -$(OBJDIR)/credits.raw: $(DOCSDIR)/CREDITS - perl $(APPDIR)/credits.pl < $< > $@ - $(OBJDIR)/UI256.bmp: UI-$(ARCHOS).bmp @echo UI @cp $< $@ @@ -163,83 +70,4 @@ $(OBJDIR)/UI256.bmp: UI-$(ARCHOS).bmp $(OBJDIR)/uisw32-res.o: uisw32.rc $(OBJDIR)/UI256.bmp $(WINDRES) -I$(OBJDIR) -i $< -o $@ -$(OBJDIR)/credits.o: $(APPDIR)/credits.c $(APPDIR)/credits.h $(OBJDIR)/credits.raw - -$(OBJDIR)/button.o: button.c -$(OBJDIR)/plugin.o: $(APPDIR)/plugin.c plugin-win32.h -$(OBJDIR)/build.lang: $(APPDIR)/lang/$(LANGUAGE).lang - @echo UPLANG - @perl $(TOOLSDIR)/uplang $(APPDIR)/lang/english.lang $< > $@ - -$(OBJDIR)/lang.o: $(OBJDIR)/build.lang - @echo GENLANG - @perl -s $(TOOLSDIR)/genlang -p=$(OBJDIR)/lang $< - @$(CC) $(CFLAGS) -c $(OBJDIR)/lang.c -o $@ - -$(OBJDIR)/sysfont.o: $(FIRMWAREDIR)/fonts/clR6x8.bdf - @echo CC $< - @$(TOOLSDIR)/convbdf -c -o $(OBJDIR)/sysfont.c $< - @$(CC) $(APPCFLAGS) -c $(OBJDIR)/sysfont.c -o $@ - -################## Plugins ################## -$(OBJDIR)/libplugin.a: $(PLUGINLIBOBJS) - @echo AR $@ - @$(AR) ru $@ $+ - @$(RANLIB) $@ - -$(OBJDIR)/%.o: $(PLUGINDIR)/lib/%.c - @echo CC $< - @$(CC) $(CFLAGS) -DPLUGIN -c $< -o $@ - -$(OBJDIR)/%.po : $(PLUGINDIR)/%.c - @echo CC $< - @$(CC) $(APPCFLAGS) -DPLUGIN -c $< -o $@ - -$(OBJDIR)/%.rock : $(OBJDIR)/%.po $(OBJDIR)/libplugin.a - @echo DLL $@ - @$(DLLTOOL) $(DLLTOOLFLAGS) -z $(OBJDIR)/$*.def $< - @$(DLLWRAP) $(DLLWRAPFLAGS) --def $(OBJDIR)/$*.def $< $(OBJDIR)/libplugin.a -o $@ - @chmod -x $@ - -################## Patterns for building objects ################## -$(OBJDIR)/%.o: %.c - @echo CC $< - @$(CC) $(CFLAGS) -c $< -o $@ - -$(OBJDIR)/%.o: $(SIMCOMMON)/%.c - @echo CC $< - @$(CC) $(APPCFLAGS) -c $< -o $@ - -$(OBJDIR)/%.o: $(MACHINEDIR)/%.c - @echo CC $< - @$(CC) $(APPCFLAGS) -c $< -o $@ - -$(OBJDIR)/%.o: $(DRIVERS)/%.c - @echo CC $< - @$(CC) $(APPCFLAGS) -c $< -o $@ - -$(OBJDIR)/%.o: $(FIRMWAREDIR)/%.c - @echo CC $< - @$(CC) $(APPCFLAGS) -c $< -o $@ - -$(OBJDIR)/%.o: $(COMMON)/%.c - @echo CC $< - @$(CC) $(APPCFLAGS) -c $< -o $@ - -$(OBJDIR)/%.o: $(APPDIR)/%.c - @echo CC $< - @$(CC) $(APPCFLAGS) -c $< -o $@ - -################## Auto-dependencies ################## -DEPS:=$(OBJDIR)/.deps - -$(DEPS)/%.d: %.c - @$(SHELL) -c 'if [ ! -d $(DEPS) ]; then \ - echo Creating the dependency directory: $(DEPS); \ - mkdir -p $(DEPS); fi' - @echo "Updating Dependencies for $<" - @$(SHELL) -ec '$(CC) -MM $(CFLAGS) $< \ - |sed '\''s|\($*\)\.o[ :]*|$(OBJDIR)/\1.o $(<:%.c=%.d) : |g'\'' > $@; \ - [ -s $@ ] || rm -f $@' - --include $(SRCS:%.c=$(DEPS)/%.d) +-include $(DEPFILE) diff --git a/uisimulator/win32/SOURCES b/uisimulator/win32/SOURCES new file mode 100644 index 0000000000..6a52c5ed5e --- /dev/null +++ b/uisimulator/win32/SOURCES @@ -0,0 +1,10 @@ +button.c +debug-win32.c +dir-win32.c +kernel.c +lcd-win32.c +mpeg-win32.c +panic-win32.c +string-win32.c +thread-win32.c +uisw32.c diff --git a/uisimulator/x11/Makefile b/uisimulator/x11/Makefile index 7b86ee2f5b..68815fe8d8 100644 --- a/uisimulator/x11/Makefile +++ b/uisimulator/x11/Makefile @@ -17,252 +17,44 @@ # ############################################################################ -RECDIR = $(APPSDIR)/recorder -PLAYDIR = $(APPSDIR)/player -PLUGINDIR = $(APPSDIR)/plugins SIMCOMMON = ../common -ISONDIO := $(findstring ONDIO, $(TARGET)) -ISIRIVER := $(findstring IRIVER, $(TARGET)) -ISPLAYER := $(findstring PLAYER, $(TARGET)) -ifeq ($(ISPLAYER), PLAYER) - MACHINEDIR = $(PLAYDIR) -else - MACHINEDIR = $(RECDIR) -endif - -PREVAPPSDIR= .. - -# build some sources from these dirs -DRIVERS = $(FIRMDIR)/drivers -COMMON = $(FIRMDIR)/common - -# include here: -EXPORT = $(FIRMDIR)/export +DEPFILE = $(OBJDIR)/dep-sim RM = rm -f DEBUG = -g -ifndef OBJDIR -no_configure: - @echo "Don't run make here. Run the tools/configure script from your own build" - @echo "directory, then run make there." - @echo - @echo "More help on how to build rockbox can be found here:" - @echo "http://rockbox.haxx.se/docs/how_to_compile.html" -endif - -DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \ -$(TARGET) -DAPPSVERSION=\"$(VERSION)\" -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES) - # Use this for simulator-only files -INCLUDES = -I. -I$(EXPORT) -I$(APPSDIR) -I$(MACHINEDIR) -I$(SIMCOMMON) -I$(OBJDIR) -I$(PLUGINDIR)/lib - -# The true Rockbox Applications should use this include path: -APPINCLUDES = $(INCLUDES) - -SRCDIRS = . $(DRIVERS) $(FIRMDIR)/export $(APPSDIR) $(MACHINEDIR) - -# The true Rockbox Applications should use this include path: -APPINCLUDES = $(INCLUDES) - -LIBS = -lpthread +INCLUDES = -I. -I$(SIMCOMMON) -I$(OBJDIR) -I$(FIRMDIR)/export -I$(APPSDIR) -CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) -W -Wall +SRC := $(shell cat SOURCES | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \ + $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -include "config.h" - ) +OBJS := $(SRC:%.c=$(OBJDIR)/%.o) -APPCFLAGS = $(DEBUG) $(DEFINES) $(APPINCLUDES) -W -Wall - -UNAME := $(shell uname|sed -e "s/CYGWIN.*/CYGWIN/") -EXEFILE = $(OBJDIR)/rockboxui -ifeq ($(UNAME),Linux) - LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl -ldl - INCLUDES += -I/usr/X11R6/include - LIBDIRS = -L/usr/X11R6/lib - DEFINES += -DHAVE_OSS -else -ifeq ($(UNAME),CYGWIN) - LDFLAGS = -lSM -lICE -lXt -lX11 -lXmu -lSM -lICE -lX11 - INCLUDES += -I/usr/X11R6/include - LIBDIRS = -L/usr/X11R6/lib - DEFINES += -DHAVE_OSS -D_SSIZE_T_ - EXEFILE = $(OBJDIR)/rockboxui.exe -else -ifeq ($(UNAME),FreeBSD) - LIBS = -pthread - LDFLAGS = -lX11 -lm -lXt -lXmu - INCLUDES += -I/usr/X11R6/include - LIBDIRS = -L/usr/X11R6/lib - DEFINES += -DHAVE_OSS -else - LDFLAGS = -lX11 -lm -lXt -lXmu -lnsl -ldl - DEFINES += -DBIG_ENDIAN - LIBDIRS = -endif -endif -endif - -ifeq ($(HAVE_MPEG_PLAY),1) - SOUNDSRC = mpegplay.c oss_sound.c - LDFLAGS += $(SOUND_LDFLAGS) - CFLAGS += $(SOUND_CFLAGS) -DHAVE_MPEG_PLAY -else - SOUNDSRC = -endif - -ifeq ($(ISPLAYER), PLAYER) - LCDSRSC = lcd-playersim.c lcd-player.c lcd-player-charset.c font-player.c -else -ifeq ($(ISIRIVER),IRIVER) - LCDSRSC = lcd-h100.c sysfont.c font.c -else - LCDSRSC = lcd-recorder.c sysfont.c font.c -endif -endif -COMMONSRCS = io.c stubs.c lcd-common.c sim_icons.c fmradio.c - -FIRMSRCS = $(LCDSRSC) id3.c mp3data.c usb.c mpeg.c mp3_playback.c \ - powermgmt.c power.c sprintf.c buffer.c strtok.c random.c \ - timefuncs.c panic.c debug.c strcasestr.c - -APPS = main.c tree.c menu.c credits.c main_menu.c icons.c language.c \ - playlist.c wps.c wps-display.c settings.c status.c \ - screens.c sleeptimer.c keyboard.c onplay.c\ - misc.c plugin.c playlist_viewer.c bookmark.c filetypes.c \ - settings_menu.c sound_menu.c playlist_menu.c filetree.c dbtree.c - -ifneq ($(ISPLAYER), PLAYER) - APPS += peakmeter.c bmp.c widgets.c radio.c -endif +DEFINES := -DHAVE_CONFIG_H -DGETTIMEOFDAY_TWO_ARGS -DSIMULATOR \ +$(TARGET) -DAPPSVERSION=\"$(VERSION)\" -DMEM=${MEMORYSIZE} $(EXTRA_DEFINES) -SRCS = screenhack.c uibasic.c resources.c visual.c lcd-x11.c \ - button-x11.c thread.c $(APPS) $(MENUS) $(FIRMSRCS) \ - $(COMMONSRCS) $(SOUNDSRC) +SOURCES = $(SRC) -OBJS := $(OBJDIR)/lang.o $(SRCS:%.c=$(OBJDIR)/%.o) +DIRS = . -ifdef ENABLEDPLUGINS - ROCKS := $(patsubst $(PLUGINDIR)/%.c,$(OBJDIR)/%.rock,$(wildcard $(PLUGINDIR)/*.c)) - PLUGINLIBOBJS := $(patsubst $(PLUGINDIR)/lib/%.c,$(OBJDIR)/%.o,$(wildcard $(PLUGINDIR)/lib/*.c)) -endif +CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) $(GCCOPTS) -all: $(TOOLSDIR)/convbdf $(EXEFILE) $(ROCKS) +OUTFILE = $(OBJDIR)/libsim.a -$(ROCKS): $(OBJDIR)/libplugin.a +all: $(OUTFILE) + @echo "MAKE in common sim" + $(MAKE) -C $(SIMCOMMON) -$(TOOLSDIR)/convbdf: - $(MAKE) -C $(TOOLSDIR) +include $(TOOLSDIR)/make.inc clean: - $(RM) $(OBJS) *~ core $(EXEFILE) $(CLIENTS) $(OBJDIR)/lang.[cho] \ - $(OBJDIR)/build.lang $(OBJDIR)/*.o $(OBJDIR)/sysfont.c \ - $(ROCKS) $(OBJDIR)/credits.raw - $(RM) -r $(DEPS) - $(RM) -f $(OBJDIR)/libplugin.a $(OBJDIR)/rockbox.zip - -################## Specific dependencies ################## -$(OBJDIR)/credits.raw: $(DOCSDIR)/CREDITS - perl $(APPSDIR)/credits.pl < $< > $@ - -$(OBJDIR)/uisw32-res.o: uisw32.rc - $(WINDRES) -i $< -o $@ - -$(OBJDIR)/credits.o: $(APPSDIR)/credits.c $(APPSDIR)/credits.h $(OBJDIR)/credits.raw - -$(OBJDIR)/thread.o: ./thread.c -$(OBJDIR)/plugin.o: $(APPSDIR)/plugin.c -$(OBJDIR)/build.lang: $(APPSDIR)/lang/$(LANGUAGE).lang - @echo "UPLANG" - @perl $(TOOLSDIR)/uplang $(APPSDIR)/lang/english.lang $< > $@ - -$(OBJDIR)/lang.o: $(OBJDIR)/build.lang - @echo GENLANG - @perl -s $(TOOLSDIR)/genlang -p=$(OBJDIR)/lang $< - @echo "CC lang.c" - $(CC) $(CFLAGS) -c $(OBJDIR)/lang.c -o $@ - -$(OBJDIR)/sysfont.o: $(FIRMDIR)/fonts/clR6x8.bdf - @echo CC $< - @$(TOOLSDIR)/convbdf -c -o $(OBJDIR)/sysfont.c $< - @$(CC) $(APPCFLAGS) -c $(OBJDIR)/sysfont.c -o $@ - -################## Plugins ################## -$(OBJDIR)/libplugin.a: $(PLUGINLIBOBJS) - @echo AR $< - @$(AR) ru $@ $+ - -$(OBJDIR)/%.o: $(PLUGINDIR)/lib/%.c - @echo CC $< - @$(CC) $(CFLAGS) -DPLUGIN -c $< -o $@ - -$(OBJDIR)/%.rock: $(APPSDIR)/plugins/%.c $(APPSDIR)/plugin.h - @echo CC $< - @$(CC) $(APPCFLAGS) -DPLUGIN -shared $< -L$(OBJDIR) -lplugin -o $@ -ifeq ($(UNAME),CYGWIN) -# 'x' must be kept or you'll have "Win32 error 5" -# $ fgrep 5 /usr/include/w32api/winerror.h | head -1 -# #define ERROR_ACCESS_DENIED 5L -else - @chmod -x $@ -endif - -################## Patterns for building objects ################## -$(OBJDIR)/%.o: ../x11/%.c - @echo CC $< - @$(CC) $(CFLAGS) -c $< -o $@ - -$(OBJDIR)/%.o: $(SIMCOMMON)/%.c - @echo CC $< - @$(CC) $(APPCFLAGS) -c $< -o $@ - -$(OBJDIR)/%.o: $(MACHINEDIR)/%.c - @echo CC $< - @$(CC) $(APPCFLAGS) -c $< -o $@ - -$(OBJDIR)/%.o: $(DRIVERS)/%.c - @echo CC $< - @$(CC) $(APPCFLAGS) -c $< -o $@ - -$(OBJDIR)/%.o: $(FIRMDIR)/%.c - @echo CC $< - @$(CC) $(APPCFLAGS) -c $< -o $@ - -$(OBJDIR)/%.o: $(COMMON)/%.c - @echo CC $< - @$(CC) $(APPCFLAGS) -c $< -o $@ - -$(OBJDIR)/%.o: $(APPSDIR)/%.c - @echo CC $< - @$(CC) $(APPCFLAGS) -c $< -o $@ - - -################## Auto-dependencies ################## -DEPS:=$(OBJDIR)/.deps - -$(DEPS)/%.d: %.c - @$(SHELL) -c 'if [ ! -d $(DEPS) ]; then \ - echo Creating the dependency directory: $(DEPS); \ - mkdir -p $(DEPS); fi' - @$(SHELL) -ec '$(CC) -MM $(CFLAGS) $< \ - |sed '\''s|\($*\)\.o[ :]*|$(OBJDIR)/\1.o $(<:%.c=%.d) : |g'\'' > $@; \ - [ -s $@ ] || rm -f $@' - --include $(SRCS:%.c=$(DEPS)/%.d) - -# these ones are simulator-specific - -$(OBJDIR)/%.o: %.c - $(CC) $(CFLAGS) -c $< -o $@ - -ifeq ($(UNAME),CYGWIN) -$(EXEFILE): $(OBJS) - @echo LD $@ - @$(CC) -g -o $(EXEFILE) $(OBJS) $(LIBDIRS) $(LDFLAGS) $(LIBS) -else -$(EXEFILE): $(OBJS) - @echo LD $@ - @$(CC) -g -o $(EXEFILE) $(LIBDIRS) $(LDFLAGS) $(OBJS) $(LIBS) -endif + @echo "cleaning sim" + @$(RM) $(OBJS) *~ core $(OUTFILE) $(DEPFILE) + @$(MAKE) -C $(SIMCOMMON) clean -tags: - @$(SHELL) -c 'for d in $(SRCDIRS); do { etags -o $(OBJDIR)/TAGS -a $$d/*.[ch]; }; done' +$(OUTFILE): $(OBJS) + @echo "AR $@" + @$(AR) ruv $@ $(OBJS) >/dev/null 2>&1 +-include $(DEPFILE) diff --git a/uisimulator/x11/SOURCES b/uisimulator/x11/SOURCES new file mode 100644 index 0000000000..ea60b4e68a --- /dev/null +++ b/uisimulator/x11/SOURCES @@ -0,0 +1,10 @@ +button-x11.c +lcd-x11.c +#if 0 /* if sound is enabled */ +oss_sound.c +#endif +resources.c +screenhack.c +thread.c +uibasic.c +visual.c |