diff options
Diffstat (limited to 'uisimulator/win32/Makefile')
-rw-r--r-- | uisimulator/win32/Makefile | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/uisimulator/win32/Makefile b/uisimulator/win32/Makefile index 3ba223d7bd..a0fd6e8a56 100644 --- a/uisimulator/win32/Makefile +++ b/uisimulator/win32/Makefile | |||
@@ -20,6 +20,7 @@ | |||
20 | APPDIR = ../../apps | 20 | APPDIR = ../../apps |
21 | RECDIR = $(APPDIR)/recorder | 21 | RECDIR = $(APPDIR)/recorder |
22 | PLAYDIR = $(APPDIR)/player | 22 | PLAYDIR = $(APPDIR)/player |
23 | PLUGINDIR = $(APPDIR)/plugins | ||
23 | 24 | ||
24 | ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) | 25 | ifeq ($(DISPLAY),-DHAVE_LCD_BITMAP) |
25 | MACHINEDIR = $(RECDIR) | 26 | MACHINEDIR = $(RECDIR) |
@@ -66,11 +67,13 @@ DEFINES += -DWIN32 | |||
66 | CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) -W -Wall -mno-cygwin | 67 | CFLAGS = $(DEBUG) $(DEFINES) $(INCLUDES) -W -Wall -mno-cygwin |
67 | 68 | ||
68 | APPCFLAGS = $(DEBUG) $(DEFINES) $(APPINCLUDES) -W -Wall -mno-cygwin | 69 | APPCFLAGS = $(DEBUG) $(DEFINES) $(APPINCLUDES) -W -Wall -mno-cygwin |
70 | DLLFLAGS = -s --entry _DllMain@12 --target=i386-mingw32 --def plugin.def | ||
69 | 71 | ||
70 | UNAME := $(shell uname|sed -e "s/CYGWIN.*/CYGWIN/") | 72 | UNAME := $(shell uname|sed -e "s/CYGWIN.*/CYGWIN/") |
71 | ifeq ($(UNAME),CYGWIN) | 73 | ifeq ($(UNAME),CYGWIN) |
72 | CC = gcc | 74 | CC = gcc |
73 | WINDRES = windres | 75 | WINDRES = windres |
76 | DLL = dllwrap | ||
74 | DEFINES += -DNOCYGWIN | 77 | DEFINES += -DNOCYGWIN |
75 | CFLAGS += -mno-cygwin | 78 | CFLAGS += -mno-cygwin |
76 | LDFLAGS += -mno-cygwin | 79 | LDFLAGS += -mno-cygwin |
@@ -78,6 +81,7 @@ ifeq ($(UNAME),CYGWIN) | |||
78 | else | 81 | else |
79 | CC = i386-mingw32msvc-gcc | 82 | CC = i386-mingw32msvc-gcc |
80 | WINDRES = i386-mingw32msvc-windres | 83 | WINDRES = i386-mingw32msvc-windres |
84 | DLL = i386-mingw32msvc-dllwrap | ||
81 | CFLAGS += -mwindows | 85 | CFLAGS += -mwindows |
82 | LDFLAGS += -mwindows | 86 | LDFLAGS += -mwindows |
83 | APPCFLAGS += -mwindows | 87 | APPCFLAGS += -mwindows |
@@ -108,7 +112,12 @@ SRCS = button.c dir-win32.c lcd-win32.c panic-win32.c thread-win32.c \ | |||
108 | 112 | ||
109 | OBJS := $(OBJDIR)/lang.o $(SRCS:%.c=$(OBJDIR)/%.o) $(OBJDIR)/uisw32-res.o | 113 | OBJS := $(OBJDIR)/lang.o $(SRCS:%.c=$(OBJDIR)/%.o) $(OBJDIR)/uisw32-res.o |
110 | 114 | ||
111 | all: $(TARGET) | 115 | ROCKSRCS = bounce.c cube.c flipit.c helloworld.c sliding_puzzle.c snow.c \ |
116 | sokoban.c star.c tetris.c viewer.c wormlet.c | ||
117 | |||
118 | ROCKS := $(ROCKSRCS:%.c=$(OBJDIR)/%.rock) | ||
119 | |||
120 | all: $(TARGET) $(ROCKS) | ||
112 | 121 | ||
113 | $(TARGET): $(OBJS) | 122 | $(TARGET): $(OBJS) |
114 | $(CC) $(OBJS) -o $(TARGET) $(LDFLAGS) | 123 | $(CC) $(OBJS) -o $(TARGET) $(LDFLAGS) |
@@ -119,7 +128,7 @@ $(OBJDIR)/uisw32-res.o: uisw32.rc | |||
119 | clean: | 128 | clean: |
120 | $(RM) $(OBJS) *~ core $(TARGET) $(CLIENTS) $(OBJDIR)/uisw32-res.o \ | 129 | $(RM) $(OBJS) *~ core $(TARGET) $(CLIENTS) $(OBJDIR)/uisw32-res.o \ |
121 | $(OBJDIR)/lang.[cho] $(OBJDIR)/build.lang $(OBJDIR)/*.o \ | 130 | $(OBJDIR)/lang.[cho] $(OBJDIR)/build.lang $(OBJDIR)/*.o \ |
122 | $(OBJDIR)/sysfont.c $(OBJDIR)/credits.raw | 131 | $(OBJDIR)/*.rock $(OBJDIR)/sysfont.c $(OBJDIR)/credits.raw |
123 | $(RM) -r $(DEPS) | 132 | $(RM) -r $(DEPS) |
124 | 133 | ||
125 | distclean: clean | 134 | distclean: clean |
@@ -161,24 +170,6 @@ $(OBJDIR)/widgets.o: $(RECDIR)/widgets.c | |||
161 | $(OBJDIR)/keyboard.o: $(MACHINEDIR)/keyboard.c | 170 | $(OBJDIR)/keyboard.o: $(MACHINEDIR)/keyboard.c |
162 | $(CC) $(APPCFLAGS) -c $< -o $@ | 171 | $(CC) $(APPCFLAGS) -c $< -o $@ |
163 | 172 | ||
164 | $(OBJDIR)/tetris.o: $(RECDIR)/tetris.c | ||
165 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
166 | |||
167 | $(OBJDIR)/wormlet.o: $(RECDIR)/wormlet.c | ||
168 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
169 | |||
170 | $(OBJDIR)/sokoban.o: $(RECDIR)/sokoban.c | ||
171 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
172 | |||
173 | $(OBJDIR)/bounce.o: $(RECDIR)/bounce.c | ||
174 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
175 | |||
176 | $(OBJDIR)/cube.o: $(RECDIR)/cube.c | ||
177 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
178 | |||
179 | $(OBJDIR)/snow.o: $(RECDIR)/snow.c | ||
180 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
181 | |||
182 | $(OBJDIR)/main.o: $(APPDIR)/main.c | 173 | $(OBJDIR)/main.o: $(APPDIR)/main.c |
183 | $(CC) $(APPCFLAGS) -c $< -o $@ | 174 | $(CC) $(APPCFLAGS) -c $< -o $@ |
184 | 175 | ||
@@ -191,9 +182,6 @@ $(OBJDIR)/wps.o: $(APPDIR)/wps.c | |||
191 | $(OBJDIR)/sleeptimer.o: $(APPDIR)/sleeptimer.c | 182 | $(OBJDIR)/sleeptimer.o: $(APPDIR)/sleeptimer.c |
192 | $(CC) $(APPCFLAGS) -c $< -o $@ | 183 | $(CC) $(APPCFLAGS) -c $< -o $@ |
193 | 184 | ||
194 | $(OBJDIR)/viewer.o: $(APPDIR)/viewer.c | ||
195 | $(CC) $(APPCFLAGS) -c $< -o $@ | ||
196 | |||
197 | $(OBJDIR)/wps-display.o: $(APPDIR)/wps-display.c | 185 | $(OBJDIR)/wps-display.o: $(APPDIR)/wps-display.c |
198 | $(CC) $(APPCFLAGS) -c $< -o $@ | 186 | $(CC) $(APPCFLAGS) -c $< -o $@ |
199 | 187 | ||
@@ -300,6 +288,12 @@ $(OBJDIR)/lcd-player.o: $(DRIVERS)/lcd-player.c | |||
300 | $(OBJDIR)/%.o: %.c | 288 | $(OBJDIR)/%.o: %.c |
301 | $(CC) $(CFLAGS) -c $< -o $@ | 289 | $(CC) $(CFLAGS) -c $< -o $@ |
302 | 290 | ||
291 | $(OBJDIR)/%.po : $(PLUGINDIR)/%.c | ||
292 | $(CC) $(CFLAGS) -c $< -o $@ | ||
293 | |||
294 | $(OBJDIR)/%.rock : $(OBJDIR)/%.po | ||
295 | $(DLL) $(DLLFLAGS) $< -o $@ | ||
296 | |||
303 | DEPS:=$(OBJDIR)/.deps | 297 | DEPS:=$(OBJDIR)/.deps |
304 | 298 | ||
305 | $(DEPS)/%.d: %.c | 299 | $(DEPS)/%.d: %.c |