1include ../config.mk 2include src-conf.mk 3 4OBJS = main.o cmdline.o cfgfile.o options.o hiscore.o lang.o \ 5 timer.o $(pctimer_obj) focus.o 6#OBJS += ../icon.o 7 8tetris: $(OBJS) libs ../config.mk 9 $(CC) -o tetris $(OBJS) game.a $(menuext_lib) menu.a $(netw_lib) input.a draw.a textgfx.a $(LDFLAGS) $(LDLIBS) 10 11main.o: main.c timer.h cfgfile.h options.h lang.h focus.h \ 12 textgfx/textgfx.h input/input.h game/tetris.h game/game.h \ 13 menu/menuext.h netw/sock.h config.h src-conf.mk 14 $(CC) $(CCFLAGS) -I. $(DTWOPLAYER) $(DSOCKET) $(DINET) $(DTTY_SOCKET) $(DNO_MENU) $(DTERM_RESIZING) $(DXLIB) $(DALLEGRO) -c main.c 15 16#cmdline.o: cmdline-empty.c 17# $(CC) $(CCFLAGS) -c -ocmdline.o cmdline-empty.c 18 19cmdline.o: cmdline.c version.h config.h config2.h options.h cfgfile.h \ 20 lang.h game/game.h textgfx/textgfx.h src-conf.mk 21 $(CC) $(CCFLAGS) -I. $(DTWOPLAYER) $(DJOYSTICK) $(DCURSES) $(DALLEGRO) $(DSOCKET) $(DINET) $(DTTY_SOCKET) $(DNO_MENU) $(DNO_BLOCKSTYLES) $(DHISCORE_FILENAME) -c cmdline.c 22 23cfgfile.o: cfgfile.c cfgfile.h options.h hiscore.h input/input.h \ 24 input/keyboard.h input/joystick.h draw/draw.h src-conf.mk 25 $(CC) $(CCFLAGS) -I. $(DTWOPLAYER) $(DJOYSTICK) $(DCURSES) $(DALLEGRO) -c cfgfile.c 26 27options.o: options.c options.h 28 29hiscore.o: hiscore.c hiscore.h cfgfile.h lang.h game/tetris.h src-conf.mk 30 $(CC) $(CCFLAGS) -I. $(DHISCORE_FILENAME) -c hiscore.c 31 32lang.o: lang.c lang.h 33 34timer.o: timer.c timer.h pctimer.h config.h config2.h ../config.mk src-conf.mk 35 $(CC) $(CCFLAGS) $(DPCTIMER) $(PCTIMER_INC) $(DALLEGRO) -c timer.c 36 37pctimer.o: ../$(PCTIMER).c ../$(PCTIMER).h ../config.mk src-conf.mk 38 $(CC) $(CCFLAGS) $(PCTIMER_INC) -c -opctimer.o ../$(PCTIMER).c 39 40focus.o: focus.c focus.h ../config.mk src-conf.mk 41 $(CC) $(CCFLAGS) $(DXLIB) $(XLIB_INC) $(DALLEGRO) -c focus.c 42 43../icon.o: ../icon.rc 44 cd ..; windres icon.rc icon.o 45 46.c.o: 47 $(CC) $(CCFLAGS) -c $< 48 49libs: gamea menua netwa inputa drawa textgfxa 50 mv -f game/game.a . 51 mv -f menu/*.a . 52 -mv -f netw/netw.a . 53 mv -f input/input.a . 54 mv -f draw/draw.a . 55 mv -f textgfx/textgfx.a . 56 57gamea: 58 $(MAKE) -Cgame 59menua: 60 $(MAKE) -Cmenu 61netwa: 62 $(MAKE) -Cnetw 63inputa: 64 $(MAKE) -Cinput $(INPUT_SYS) 65drawa: 66 $(MAKE) -Cdraw 67textgfxa: 68 $(MAKE) -Ctextgfx 69 70clean: 71 rm -f tetris tetris.exe $(OBJS) pctimer.o 72 rm -f game.a menu.a menuext.a netw.a input.a draw.a textgfx.a 73 $(MAKE) -Cgame clean 74 $(MAKE) -Cmenu clean 75 $(MAKE) -Cnetw clean 76 $(MAKE) -Cinput clean 77 $(MAKE) -Cdraw clean 78 $(MAKE) -Ctextgfx clean 79 80.PHONY: libs gamea menua netwa inputa drawa textgfxa clean 81