diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2009-06-20 13:56:20 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2009-06-20 13:56:20 -0400 |
commit | af121493c84c116b06f2572846535293a827d089 (patch) | |
tree | dc04a8e44a933c42dfec19303051989f8132d15a /Makefile | |
parent | 306c130cc425e96d2088f68551c4bb77dad412d3 (diff) | |
download | mazeoflife-af121493c84c116b06f2572846535293a827d089.tar.gz mazeoflife-af121493c84c116b06f2572846535293a827d089.tar.bz2 mazeoflife-af121493c84c116b06f2572846535293a827d089.zip |
Embedded images into executable file
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Makefile b/Makefile index 7f503ba..a4fe8ff 100644 --- a/Makefile +++ b/Makefile | |||
@@ -1,12 +1,15 @@ | |||
1 | OBJS = mazeoflife.o titlestate.o htpstate.o gamestate.o | 1 | SOURCES = mazeoflife.cpp titlestate.cpp htpstate.cpp gamestate.cpp |
2 | OBJS = $(SOURCES:.cpp=.cpp.o) | ||
3 | IMAGES = title.bmp pointer.bmp htp1.bmp htp2.bmp | ||
4 | CIMAGES = $(IMAGES:.bmp=.bmp.o) | ||
2 | CC = g++ | 5 | CC = g++ |
3 | CFLAGS = `pkg-config sdl --cflags` | 6 | CFLAGS = `pkg-config sdl --cflags` |
4 | LIBS = `pkg-config sdl --libs` | 7 | LIBS = `pkg-config sdl --libs` |
5 | 8 | ||
6 | mazeoflife: $(OBJS) | 9 | mazeoflife: $(OBJS) $(CIMAGES) |
7 | $(CC) $(OBJS) $(LIBS) -o mazeoflife | 10 | $(CC) $(OBJS) $(CIMAGES) $(LIBS) -o mazeoflife |
8 | 11 | ||
9 | %.o: %.cpp | 12 | %.cpp.o: %.cpp |
10 | $(CC) -c $< $(CFLAGS) -o $@ | 13 | $(CC) -c $< $(CFLAGS) -o $@ |
11 | 14 | ||
12 | %.d: %.cpp | 15 | %.d: %.cpp |
@@ -15,7 +18,10 @@ mazeoflife: $(OBJS) | |||
15 | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ | 18 | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ |
16 | rm -f $@.$$$$ | 19 | rm -f $@.$$$$ |
17 | 20 | ||
18 | include $(OBJS:.o=.d) | 21 | %.bmp.o: %.bmp |
22 | objcopy --input binary --output elf32-i386 -B i386 $< $@ | ||
23 | |||
24 | include $(OBJS:.cpp.o=.d) | ||
19 | 25 | ||
20 | clean: | 26 | clean: |
21 | rm -rdfv $(OBJS) $(OBJS:.o=.d) mazeoflife | 27 | rm -rdfv $(OBJS) $(OBJS:.cpp.o=.d) $(CIMAGES) mazeoflife |