1 # Makefile for supertux
4 # bill@newbreedsoftware.com
5 # http://www.newbreedsoftware.com/
9 # April 11, 2000 - December 26, 2000
12 # User-definable stuff:
14 DATA_PREFIX=$(PWD)/data
24 CFLAGS=-Wall -O2 $(SDL_CFLAGS) -DDATA_PREFIX=\"$(DATA_PREFIX)\" \
25 -D$(NOSOUNDFLAG) -D$(TARGET_DEF) -DJOY_$(JOY)
33 SDL_LIB=$(SDL_LDFLAGS) $(SDL_MIXER) $(SDL_IMAGE)
34 SDL_CFLAGS := $(shell sdl-config --cflags)
35 SDL_LDFLAGS := $(shell sdl-config --libs)
36 installbin = install -g root -o root -m 755
37 installdat = install -g root -o root -m 644
40 OBJECTS=obj/supertux.o obj/setup.o obj/intro.o obj/title.o obj/gameloop.o \
41 obj/screen.o obj/sound.o
48 # -$(installdat) data $(DESTDIR)/usr/share/games/$(TARGET)/data
49 # -$(installbin) $(TARGET) $(DESTDIR)/usr/games/
53 make supertux SDL_MIXER= NOSOUNDFLAG=NOSOUND
56 make TARGET_DEF=WIN32 TARGET=supertux.exe \
58 cp /usr/local/cross-tools/i386-mingw32/lib/SDL*.dll .
62 -rm supertux supertux.exe
70 $(CC) $(CFLAGS) $(OBJECTS) -o $(TARGET) $(SDL_LIB)
75 obj/supertux.o: src/supertux.c src/defines.h src/globals.h \
76 src/setup.h src/intro.h src/title.h src/gameloop.h \
77 src/screen.h src/sound.h
78 $(CC) $(CFLAGS) src/supertux.c -c -o obj/supertux.o
80 obj/setup.o: src/setup.c src/setup.h \
81 src/defines.h src/globals.h src/screen.h
82 $(CC) $(CFLAGS) src/setup.c -c -o obj/setup.o
84 obj/intro.o: src/intro.c src/intro.h \
85 src/defines.h src/globals.h src/screen.h
86 $(CC) $(CFLAGS) src/intro.c -c -o obj/intro.o
88 obj/title.o: src/title.c src/title.h \
89 src/defines.h src/globals.h src/screen.h
90 $(CC) $(CFLAGS) src/title.c -c -o obj/title.o
92 obj/gameloop.o: src/gameloop.c src/gameloop.h \
93 src/defines.h src/globals.h src/screen.h src/sound.h \
95 $(CC) $(CFLAGS) src/gameloop.c -c -o obj/gameloop.o
97 obj/screen.o: src/screen.c src/defines.h src/globals.h src/screen.h
98 $(CC) $(CFLAGS) src/screen.c -c -o obj/screen.o
100 obj/sound.o: src/sound.c src/defines.h src/globals.h src/sound.h
101 $(CC) $(CFLAGS) src/sound.c -c -o obj/sound.o