# # server Makefile - build ww, wg, fmtb_parse, and other programs # # Copyright (C) 2006 Nathan (Acorn) Pooley # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License (gpl.txt) for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # You can contact the author, Nathan (Acorn) Pooley, by writing # to Nathan (Acorn) Pooley, 949 Buckeye Drive, Sunnyvale, CA 94086, USA # or through the form at http://www.rawbw.com/~acorn/wand/feedback.html # -include ../Makefile.cfg TARGETS := TARGETS += ww TARGETS += my_sqrt16 TARGETS += calc TARGETS += parse TARGETS += check TARGETS += fmtb_parse TARGETS += fff TARGETS += fmtb_parse_oldA TARGETS += wparse.inc TARGETS += wmspells.inc ifeq ($(WAND_HAVE_GLX),1) TARGETS += wg TARGETS += graph TARGETS += gg endif # serv MAKEFLAGS := -r OBJS := OBJS += ac_assert.o OBJS += ac_fdio.o OBJS += ac_hexfile.o OBJS += ac_log.o OBJS += ac_serialio.o OBJS += ac_time.o OBJS += calc.o OBJS += check.o OBJS += fmtb_parse.o OBJS += my_sqrt16.o OBJS += parse.o OBJS += wandio.o OBJS += wg.o OBJS += ww.o OBJS += picsim.o ifeq ($(WAND_HAVE_GLX),1) OBJS += graph.o OBJS += gg.o endif OBJS_ww := \ ww.o \ wandio.o \ ac_serialio.o \ ac_fdio.o \ ac_time.o \ ac_hexfile.o \ ac_log.o \ OBJS_serv := \ serv.o \ ac_serialio.o \ ac_fdio.o \ ac_time.o \ ac_hexfile.o \ ac_log.o \ OBJS_wg := \ wg.o \ graph.o \ ac_serialio.o \ ac_fdio.o \ ac_time.o \ ac_hexfile.o \ ac_log.o \ OBJS_gg := \ gg.o \ graph.o \ OBJS_my_sqrt16 := \ my_sqrt16.o \ ac_assert.o \ OBJS_calc := \ calc.o \ OBJS_parse := \ parse.o \ OBJS_fmtb_parse := \ fmtb_parse.o \ picsim.o \ ac_assert.o \ OBJS_fmtb_parse_oldA := \ fmtb_parse_oldA.o \ OBJS_check := \ check.o \ ac_assert.o \ default: all all: $(OBJS) $(TARGETS) GLX_LDFLAGS := ifeq ($(WAND_HAVE_GLX),1) GLX_LDFLAGS := -L/usr/X11R6/lib -lGL -lXext -lX11 endif LINK_CMD = \ echo "======= Linking $@" ; \ gcc -g -Wall -o $@ $+ $(GLX_LDFLAGS) -lm #serv: $(OBJS_COMMON) serv.o # gcc -g -Wall -o $@ $+ serv: $(OBJS_serv) $(LINK_CMD) ww: $(OBJS_ww) $(LINK_CMD) wg: $(OBJS_wg) $(LINK_CMD) gg: $(OBJS_wg) $(LINK_CMD) calc: $(OBJS_calc) $(LINK_CMD) parse: $(OBJS_parse) $(LINK_CMD) fmtb_parse: $(OBJS_fmtb_parse) $(LINK_CMD) fff: fmtb_parse cp $< $@ fmtb_parse.o: fmtb_pic.c fmtb_parse_oldA: $(OBJS_fmtb_parse_oldA) $(LINK_CMD) check: $(OBJS_check) $(LINK_CMD) my_sqrt16: $(OBJS_my_sqrt16) $(LINK_CMD) graph: graph.c gcc -g -DGRAPHTEST -Wall -o $@ $< -L/usr/X11R6/lib -lGL -lXext -lX11 -lm %.o: %.c echo "======= Compiling $@" gcc -g -Wall -I../sw -c -MD -o $@ $< wparse.inc: fmtb_pic.c picsim2pic.seds Makefile spells.h echo "Creating $@ from $<" cpp -DPIC_CSIM=0 -Wundef -C $< $<.i echo ";" > $@ echo "; AUTOGENERATED FILE - DO NOT EDIT" >> $@ echo ";" >> $@ echo "; This file is generated from $<" >> $@ echo "; using cpp and sed (with picsim2pic.seds)." >> $@ echo "; See Makefile $@ rule for exact commands." >> $@ echo ";" >> $@ echo "" >> $@ grep '#define' spells.h | grep -v '\\' | sed -f picsim2pic.seds >> $@ echo "" >> $@ grep '#define' $< | grep -v '\\' | sed -f picsim2pic.seds >> $@ echo "" >> $@ grep 'picReg' $<.i | \ sed -e 's|.*([ ]*||' \ -e 's|[ ]*[),].*||' \ -e 's|.*|picReg(&)|' | \ sort -u | \ sed -f picsim2pic.seds >> $@ echo "" >> $@ grep -v 'picReg' $<.i | sed -f picsim2pic.seds >> $@ wmspells.inc: fmtb_parse Makefile echo "Creating $@ from $<" ./fmtb_parse -s -q -W$@ dist_files: \ls Makefile *.c *.h *.seds \ls mwanemes.txt notes.txt problems.txt \ls aaa ggg htt lll rrr th tth w2g wgg ws \ls quicktest regress \ls try* | grep -v result dist_data_files: -\ls picfmtb_official/wpic_*.txt 2>/dev/null -\ls picfmtb_spells/wpic_*.txt 2>/dev/null -\ls picfmtb_sean/wpic_*.txt 2>/dev/null clean: echo "======= Cleaning" \rm -f *.d *.o $(TARGETS) *.i .PHONY: clean dist_files -include *.d n=.SILENT $n dummy: |
This file Copyright (C) 2006 by Nathan (Acorn) Pooley
Go to TOP Wand page
Go to Acorn's personal webpage
Go to Hogwarts website: www.gotohogwarts.com
Snout: www.snout.org/game
Gadgets of Justice Unlimited
Snout GC (Wiki)
Snout Wiki
File created by do_doc at Wed May 30 03:30:27 PDT 2007