1# 2# FTE makefile for use with the MinGW toolchain 3# 4# Please note that the common GNU Make 3.77 port for MinGW is broken 5# and does not process this makefile correctly . Get a working Make 3.79.1 6# from http://www.nextgeneration.dk/gnu/ 7# 8# The author, Jon Svendsen, explicitly places this module 9# in the Public Domain 10# 11 12INCDIR = 13LIBDIR = 14 15OPTIMIZE = -O -s 16 17MT = -Zmt 18 19CC = g++ 20LD = g++ 21 22# uncomment this if you don't have fileutils installed 23# RM = del 24 25OEXT=o 26 27DEFS=-DNT -DNTCONSOLE -DMINGW 28 29CCFLAGS = $(OPTIMIZE) -x c++ -Wall $(DEFS) $(INCDIR) -pipe 30LDFLAGS = $(OPTIMIZE) $(LIBDIR) -Wl,-static 31 32.SUFFIXES: .cpp .$(OEXT) 33 34include objs.inc 35 36.cpp.$(OEXT): 37 $(CC) $(CCFLAGS) -c $< 38 39.c.$(OEXT): 40 $(CC) $(CCFLAGS) -c $< 41 42all: cfte.exe fte.exe 43 44cfte.exe: $(CFTE_OBJS) 45 $(LD) $(LDFLAGS) $(CFTE_OBJS) -o cfte.exe $(LIBS) 46 47defcfg.cnf: defcfg.fte cfte.exe 48 -"./cfte.exe" defcfg.fte defcfg.cnf 49 50defcfg.h: defcfg.cnf bin2c.exe 51 -"./bin2c.exe" defcfg.cnf >defcfg.h 52 53bin2c.exe: bin2c.cpp 54 $(CC) $(CCFLAGS) bin2c.cpp -o bin2c.exe 55 56c_config.$(OEXT): defcfg.h 57 58fte.exe: $(OBJS) $(NTOBJS) 59 -$(LD) $(LDFLAGS) $(OBJS) $(NTOBJS) -o fte.exe $(LIBS) 60 61clean: 62 -$(RM) fte.exe cfte.exe bin2c.exe defcfg.cnf defcfg.h $(OBJS) $(NTOBJS) $(CFTE_OBJS)