1# 2# Rules for building Teo with djgpp. This file is included 3# by the primary makefile, and should not be used directly. 4# 5# The "depend" target uses sed. 6# 7# See makefile.all for a list of the available targets. 8 9 10ifneq (,$(findstring bash,$(SHELL))) 11 UNIX_TOOLS = 1 12endif 13 14 15# ------ compiler flags ------ 16 17ifdef DEBUGMODE 18 19# -- debugging build -- 20CFLAGS = -g -DDEBUG $(WFLAGS) 21LFLAGS = -g 22LIB = -lalld 23DESCRIPTION = debugging 24 25else 26ifdef PROFILEMODE 27 28# -- profiling build -- 29CFLAGS = -pg $(WFLAGS) $(OFLAGS) 30LFLAGS = -pg 31LIB = -lallp 32DESCRIPTION = profiling 33 34else 35 36# -- optimised build -- 37CFLAGS = $(WFLAGS) $(OFLAGS) 38LFLAGS = -s 39LIB = -lalleg 40DESCRIPTION = optimized 41 42endif 43endif 44 45 46ifdef ENGLISH 47CFLAGS += -DENGLISH_LANGUAGE 48else 49CFLAGS += -DFRENCH_LANGUAGE 50endif 51 52# ------ plateform-dependant objects and executables ------ 53 54PLATFORM = djgpp 55EXE_NAME = teo.exe 56OBJ_DIR = obj/djgpp 57 58VPATH += src/alleg src/dos src/alleg/agui 59 60OBJ_LIST = $(COMMON_OBJ_LIST) $(basename $(notdir $(TEO_SRC_ALLEG_FILES) $(TEO_SRC_DOS_FILES))) 61 62 63# ------ special file rules ------ 64 65$(OBJ_DIR)/teo.o: src/teo.c 66 $(CC) -c $(CFLAGS) -DTEO_NO_BORDER -I./include -o $(OBJ_DIR)/teo.o src/teo.c 67 68 69# ------ dependency generation ------- 70 71DEPEND_PARAMS = -MM -MG -DSCAN_DEPEND -I./include 72 73depend: 74 $(CC) $(DEPEND_PARAMS) src/*.c src/mc68xx/*.c src/media/*.c src/media/disk/*.c src/media/disk/controlr/*.c src/media/printer/*.c src/alleg/*.c src/alleg/agui/*.c src/dos/*.c src/file/bmp.c > _depend.tmp 75 sed -e "s/^[a-zA-Z0-9_\/]*\///" _depend.tmp > _depend2.tmp 76 sed -e "s/^\([a-zA-Z0-9_]*\.o:\)/obj\/djgpp\/\1/" _depend2.tmp > obj/djgpp/makefile.dep 77 del _depend.tmp 78 del _depend2.tmp 79