From 1a501b7e6c7c71e645a36edbc4b153bd66ca99fd Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 21 Jan 1998 02:55:42 +0000 Subject: [PATCH] Incorporated new make system from Bob Kuehne . --- AssemTris/Makefile | 37 ++++++++++--------------------------- FixNode/Makefile | 46 ++++++++++------------------------------------ FixObj/Makefile | 40 +++++++++------------------------------- SplitTris/Makefile | 37 ++++++++++--------------------------- Tools/Makefile | 26 +++++++++++++++----------- Tri2obj/Makefile | 35 +++++++++-------------------------- 6 files changed, 63 insertions(+), 158 deletions(-) diff --git a/AssemTris/Makefile b/AssemTris/Makefile index 3876ad272..842396e04 100644 --- a/AssemTris/Makefile +++ b/AssemTris/Makefile @@ -26,46 +26,29 @@ TARGET = assemtris -CFILES = assemtris.c ../../Src/Scenery/tileutils.c -OFILES = $(CFILES:.c=.o) +CFILES = assemtris.c +LDLIBS = -lMath -lScenery -lm -include ../make.inc - - -CFLAGS = $(FG_CFLAGS) -g +include $(FG_ROOT_SRC)/commondefs #--------------------------------------------------------------------------- -# Primary Targets +# Rule for TARGET #--------------------------------------------------------------------------- -all: $(TARGET) - -$(TARGET): $(OFILES) - $(CC) $(OFILES) -o $(TARGET) ../../Src/Math/libMath.a -lm +$(TARGET): $(OBJECTS) + $(CC) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(LDLIBS) -clean: - rm -f *.o $(TARGET) lib*.a *.os2 *~ core -realclean: clean - - -#--------------------------------------------------------------------------- -# Secondary Targets -#--------------------------------------------------------------------------- - -makedepend: - $(CC) -MM *.c > depend - -include depend - -assemtris.o: assemtris.c - $(CC) $(CFLAGS) -c assemtris.c -o $@ +include $(COMMONRULES) #--------------------------------------------------------------------------- # $Log$ +# Revision 1.2 1998/01/21 02:55:46 curt +# Incorporated new make system from Bob Kuehne . +# # Revision 1.1 1998/01/15 02:45:25 curt # Initial revision. # diff --git a/FixNode/Makefile b/FixNode/Makefile index 236c6acc9..80e346cd3 100644 --- a/FixNode/Makefile +++ b/FixNode/Makefile @@ -26,55 +26,29 @@ TARGET = fixnode -CFILES = ../Dem2node/demparse.c fixnode.c main.c ../Dem2node/mesh.c triload.c -OFILES = $(CFILES:.c=.o) +CFILES = fixnode.c main.c triload.c +LDLIBS = ../Dem2node/demparse.o ../Dem2node/mesh.o -lm -include ../make.inc - - -CFLAGS = $(FG_CFLAGS) -g - - -#--------------------------------------------------------------------------- -# Primary Targets -#--------------------------------------------------------------------------- - -all: $(TARGET) - -$(TARGET): $(OFILES) - $(CC) $(OFILES) -o $(TARGET) - -clean: - rm -f *.o $(TARGET) lib*.a *.os2 *~ core - -realclean: clean +include $(FG_ROOT_SRC)/commondefs #--------------------------------------------------------------------------- -# Secondary Targets +# Rule for TARGET #--------------------------------------------------------------------------- -makedepend: - $(CC) -MM *.c > depend - -include depend +$(TARGET): $(OBJECTS) + $(CC) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(LDLIBS) -../Dem2node/demparse.o: ../Dem2node/demparse.c - $(CC) $(CFLAGS) -c ../Dem2node/demparse.c -o $@ -main.o: main.c - $(CC) $(CFLAGS) -c main.c -o $@ - -mesh.o: mesh.c - $(CC) $(CFLAGS) -c mesh.c -o $@ - -triload.o: triload.c - $(CC) $(CFLAGS) -c triload.c -o $@ +include $(COMMONRULES) #--------------------------------------------------------------------------- # $Log$ +# Revision 1.2 1998/01/21 02:55:50 curt +# Incorporated new make system from Bob Kuehne . +# # Revision 1.1 1997/11/27 00:17:32 curt # Initial revision. # diff --git a/FixObj/Makefile b/FixObj/Makefile index 0061b1213..64a5bc17d 100644 --- a/FixObj/Makefile +++ b/FixObj/Makefile @@ -27,50 +27,28 @@ TARGET = fixobj CFILES = main.c obj.c -OFILES = $(CFILES:.c=.o) +LDLIBS = -lMath -lm -include ../make.inc - - -CFLAGS = $(FG_CFLAGS) -g - -LIBS = ../../Src/Math/libMath.a -lm +include $(FG_ROOT_SRC)/commondefs #--------------------------------------------------------------------------- -# Primary Targets +# Rule for TARGET #--------------------------------------------------------------------------- -all: $(TARGET) - -$(TARGET): $(OFILES) - $(CC) $(OFILES) -o $(TARGET) $(LIBS) +$(TARGET): $(OBJECTS) + $(CC) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(LDLIBS) -clean: - rm -f *.o $(TARGET) lib*.a *.os2 *~ core -realclean: clean - - -#--------------------------------------------------------------------------- -# Secondary Targets -#--------------------------------------------------------------------------- - -makedepend: - $(CC) -MM *.c > depend - -include depend - -main.o: main.c - $(CC) $(CFLAGS) -c main.c -o $@ - -obj.o: obj.c - $(CC) $(CFLAGS) -c obj.c -o $@ +include $(COMMONRULES) #--------------------------------------------------------------------------- # $Log$ +# Revision 1.2 1998/01/21 02:55:53 curt +# Incorporated new make system from Bob Kuehne . +# # Revision 1.1 1997/12/08 19:28:54 curt # Initial revision. # diff --git a/SplitTris/Makefile b/SplitTris/Makefile index e511d7187..27313a425 100644 --- a/SplitTris/Makefile +++ b/SplitTris/Makefile @@ -26,46 +26,29 @@ TARGET = splittris -CFILES = splittris.c ../../Src/Scenery/tileutils.c -OFILES = $(CFILES:.c=.o) +CFILES = splittris.c +LDLIBS = -lMath -lScenery -lm -include ../make.inc - - -CFLAGS = $(FG_CFLAGS) -g +include $(FG_ROOT_SRC)/commondefs #--------------------------------------------------------------------------- -# Primary Targets +# Rule for TARGET #--------------------------------------------------------------------------- -all: $(TARGET) - -$(TARGET): $(OFILES) - $(CC) $(OFILES) -o $(TARGET) ../../Src/Math/libMath.a -lm +$(TARGET): $(OBJECTS) + $(CC) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(LDLIBS) -clean: - rm -f *.o $(TARGET) lib*.a *.os2 *~ core -realclean: clean - - -#--------------------------------------------------------------------------- -# Secondary Targets -#--------------------------------------------------------------------------- - -makedepend: - $(CC) -MM *.c > depend - -include depend - -splittris.o: splittris.c - $(CC) $(CFLAGS) -c splittris.c -o $@ +include $(COMMONRULES) #--------------------------------------------------------------------------- # $Log$ +# Revision 1.3 1998/01/21 02:55:55 curt +# Incorporated new make system from Bob Kuehne . +# # Revision 1.2 1998/01/14 15:54:42 curt # Initial revision completed. # diff --git a/Tools/Makefile b/Tools/Makefile index 44eb3cdeb..d28cea3e5 100644 --- a/Tools/Makefile +++ b/Tools/Makefile @@ -24,26 +24,27 @@ #--------------------------------------------------------------------------- -include make.inc +include $(FG_ROOT_SRC)/commondefs SUBDIRS = AssemTris Dem2node FixNode FixObj SplitTris Stripe_u Tri2obj Triangle +ORDEREDDIRS = $(SUBDIRS) all: - for dir in $(SUBDIRS); do \ + for dir in $(ORDEREDDIRS); do \ ( cd $$dir; $(MAKE) ) ; \ done depend: - for dir in $(SUBDIRS); do \ + for dir in $(ORDEREDDIRS); do \ ( echo "Making depend in $$dir"; \ cd $$dir; $(CC) -MM *.c > depend ) ; \ done Makefile-os2: cat Makefile | perl mkmfos2.pl > Makefile.os2; \ - for dir in $(SUBDIRS); do \ + for dir in $(ORDEREDDIRS); do \ ( echo "Making Makefile.os2 in $$dir"; \ cat $$dir/Makefile | perl mkmfos2.pl > $$dir/Makefile.os2; \ cat $$dir/depend | perl mkmfos2.pl > $$dir/depend.os2) ; \ @@ -51,24 +52,24 @@ Makefile-os2: clean: -rm -f *.os2 *~ - for dir in $(SUBDIRS); do \ + for dir in $(ORDEREDDIRS); do \ (cd $$dir; $(MAKE) clean) ; \ done source-tar: clean - echo "need to fix this" (cd ..; \ tar cvzf demtools-$(VERSION).tar.gz Tools/Makefile Tools/README \ - Tools/TODO Tools/make.inc Tools/Dem2node Tools/FixNode Tools/FixObj \ - Tools/Stripe_u Tools/Tri2obj Tools/Triangle Tools/mesa-e.dem) + Tools/TODO Tools/make.inc Tools/AssemTris Tools/Dem2node \ + Tools/FixNode Tools/FixObj Tools/SplitTris Tools/Stripe_u \ + Tools/Tri2obj Tools/Triangle) source-zip: clean - echo "need to fix this" (cd ..; \ zip -r demtools-$(VERSION).zip Tools/Makefile Tools/README \ - Tools/TODO Tools/make.inc Tools/Dem2node Tools/FixNode Tools/FixObj \ - Tools/Stripe_u Tools/Tri2obj Tools/Triangle Tools/mesa-e.dem) + Tools/TODO Tools/make.inc Tools/AssemTris Tools/Dem2node \ + Tools/FixNode Tools/FixObj Tools/SplitTris Tools/Stripe_u \ + Tools/Tri2obj Tools/Triangle) bin-tar: all echo "need to fix this" @@ -88,6 +89,9 @@ bin-zip: #--------------------------------------------------------------------------- # $Log$ +# Revision 1.6 1998/01/21 02:55:42 curt +# Incorporated new make system from Bob Kuehne . +# # Revision 1.5 1998/01/14 15:55:34 curt # Finished splittris, started assemtris. # diff --git a/Tri2obj/Makefile b/Tri2obj/Makefile index 9cdbaaa61..abc733a89 100644 --- a/Tri2obj/Makefile +++ b/Tri2obj/Makefile @@ -26,46 +26,29 @@ TARGET = tri2obj -CFILES = tri2obj.c ../../Src/Scenery/tileutils.c -OFILES = $(CFILES:.c=.o) +CFILES = tri2obj.c +LDLIBS = -lMath -lScenery -lm -include ../make.inc - - -CFLAGS = $(FG_CFLAGS) -O3 -fomit-frame-pointer -funroll-all-loops -ffast-math +include $(FG_ROOT_SRC)/commondefs #--------------------------------------------------------------------------- # Primary Targets #--------------------------------------------------------------------------- -all: $(TARGET) - -$(TARGET): $(OFILES) - $(CC) $(OFILES) -o $(TARGET) ../../Src/Math/libMath.a -lm +$(TARGET): $(OBJECTS) + $(CC) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(LDLIBS) -clean: - rm -f *.o $(TARGET) lib*.a *.os2 *~ core -realclean: clean - - -#--------------------------------------------------------------------------- -# Secondary Targets -#--------------------------------------------------------------------------- - -makedepend: - $(CC) -MM *.c > depend - -include depend - -tri2obj.o: tri2obj.c - $(CC) $(CFLAGS) -c tri2obj.c -o $@ +include $(COMMONRULES) #--------------------------------------------------------------------------- # $Log$ +# Revision 1.5 1998/01/21 02:55:56 curt +# Incorporated new make system from Bob Kuehne . +# # Revision 1.4 1998/01/17 01:25:39 curt # Added support for shared normals. # -- 2.39.2