Commits

Jake Todd committed 5e0470f

cleanup

Comments (0)

Files changed (14)

+include config.mk
+
+EXES = qbsp light vis bspinfo entmap visx
+
+all: $(EXES)
+
+clean:
+	rm */*.o bin/$(EXES)
+
+qbsp : qbsp/region.o qbsp/brush.o common/cmdlib.o qbsp/csg4.c qbsp/surfaces.o \
+	common/mathlib.o qbsp/merge.o qbsp/outside.o qbsp/portals.o qbsp/qbsp.o \
+	qbsp/solidbsp.o qbsp/tjunc.o qbsp/writebsp.o common/bspfile.o qbsp/nodraw.o
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/qbsp qbsp/region.o qbsp/brush.o common/cmdlib.o \
+	qbsp/csg4.c qbsp/surfaces.o common/mathlib.o qbsp/merge.o common/bspfile.o \
+	qbsp/nodraw.o qbsp/tjunc.o qbsp/writebsp.o common/bspfile.o qbsp/nodraw.o
+
+light : common/threads.o bspfile.o cmdlib.o light.o ltface.o mathlib.o trace.o entities.o
+	$(CC) $(CFLAGS) -o light threads.o bspfile.o cmdlib.o light.o ltface.o mathlib.o trace.o entities.o
+	
+vis : vis.o flow.o cmdlib.o mathlib.o bspfile.o soundpvs.o
+	$(CC) $(CFLAGS) $(LDFLAGS) -o vis vis.o flow.o cmdlib.o mathlib.o bspfile.o soundpvs.o
+
+visx : visx.o flowx.o cmdlib.o mathlib.o bspfile.o soundpvs.o
+	$(CC) $(CFLAGS) $(LDFLAGS) -o visx visx.o flowx.o cmdlib.o mathlib.o bspfile.o soundpvs.o
+
+bspinfo : bspinfo.o bspfile.o cmdlib.o
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bspinfo bspinfo.o bspfile.o cmdlib.o
+
+entmap : entmap.o cmdlib.o
+	$(CC) $(CFLAGS) $(LDFLAGS) -o entmap entmap.o cmdlib.o
+
+cmdlib.o : ../cmdlib.c
+	$(CC) $(CFLAGS) -c -o cmdlib.o ../cmdlib.c
+mathlib.o : ../mathlib.c
+	$(CC) $(CFLAGS) -c -o mathlib.o ../mathlib.c
-// brush.c
-
 #include "bsp5.h"
 
 int numbrushplanes;
-#include "../common/cmdlib.h"
-#include "../common/mathlib.h"
-#include "../common/bspfile.h"
+#include "cmdlib.h"
+#include "mathlib.h"
+#include "bspfile.h"
 
 typedef struct {
 	vec3_t	normal;
 	int		type;
 } plane_t;
 
-
 #include "map.h"
 
 #define	MAX_THREADS	4
-// csg4.c
-
 #include "bsp5.h"
 
 /*

qbsp/makefile

-
-EXES = qbsp light vis bspinfo entmap visx
-NTEXES = qbsp.exe light.exe vis.exe bspinfo.exe entmap.exe visx.exe
-LDFLAGS=-lm
-
-#==============================================================================
-
-EXT=	.o
-
-all: $(EXES)
-
-clean:
-	rm *.o *.obj $(EXES) $(NTEXES)
-
-next:
-	make "CFLAGS = -g -Wall -I.."
-
-nextinstall:
-	make "CFLAGS = -O4 -g -Wall  -I.. -arch i386 -arch hppa"
-	cp $(EXES) /LocalApps
-
-alpha:
-	make "CFLAGS = -g  -I.." "LDFLAGS = -lm"
-
-alphainstall:
-	make "CFLAGS = -O4  -I.." "LDFLAGS = -lm"
-	cp $(EXES) /LocalApps
-
-nt:
-	nmake /nologo "CFLAGS =  -nologo -Zi -DWIN32 -I.." "LDFLAGS = " "EXT = .obj"
-
-ntinstall:
-	nmake /nologo "CFLAGS =  -nologo -Ox -G5 -DWIN32 -I.." "LDFLAGS = " "EXT = .obj"
-	cp $(NTEXES) f:\nt\id
-
-#==============================================================================
-
-
-QBSPFILES = region$(EXT) map$(EXT) brush$(EXT) ../common/cmdlib$(EXT) csg4$(EXT) surfaces$(EXT) ../common/mathlib$(EXT)\
-         merge$(EXT) outside$(EXT) portals$(EXT) qbsp$(EXT) solidbsp$(EXT) tjunc$(EXT)\
-         writebsp$(EXT) ../common/bspfile$(EXT) nodraw$(EXT)
-qbsp : $(QBSPFILES)
-	$(CC) $(CFLAGS) $(LDFLAGS) -o qbsp $(QBSPFILES)
-
-light : threads$(EXT) bspfile$(EXT) cmdlib$(EXT) light$(EXT) ltface$(EXT) mathlib$(EXT) trace$(EXT) entities$(EXT)
-	$(CC) $(CFLAGS) -o light threads$(EXT) bspfile$(EXT) cmdlib$(EXT) light$(EXT) ltface$(EXT) mathlib$(EXT) trace$(EXT) entities$(EXT)
-	
-vis : vis$(EXT) flow$(EXT) cmdlib$(EXT) mathlib$(EXT) bspfile$(EXT) soundpvs$(EXT)
-	$(CC) $(CFLAGS) -o vis vis$(EXT) flow$(EXT) cmdlib$(EXT) mathlib$(EXT) bspfile$(EXT) soundpvs$(EXT)
-
-visx : visx$(EXT) flowx$(EXT) cmdlib$(EXT) mathlib$(EXT) bspfile$(EXT) soundpvs$(EXT)
-	$(CC) $(CFLAGS) -o visx visx$(EXT) flowx$(EXT) cmdlib$(EXT) mathlib$(EXT) bspfile$(EXT) soundpvs$(EXT)
-
-bspinfo : bspinfo$(EXT) bspfile$(EXT) cmdlib$(EXT)
-	$(CC) $(CFLAGS) -o bspinfo bspinfo$(EXT) bspfile$(EXT) cmdlib$(EXT)
-
-entmap : entmap$(EXT) cmdlib$(EXT)
-	$(CC) $(CFLAGS) -o entmap entmap$(EXT) cmdlib$(EXT)
-
-
-cmdlib$(EXT) : ../cmdlib.c
-	$(CC) $(CFLAGS) -c -o cmdlib$(EXT) ../cmdlib.c
-mathlib$(EXT) : ../mathlib.c
-	$(CC) $(CFLAGS) -c -o mathlib$(EXT) ../mathlib.c
-
-
-// map.c
-
 #include "bsp5.h"
 #include <math.h>
 
-// merge.c
-
 #include "bsp5.h"
 
-
 #define CONTINUOUS_EPSILON	0.001
 
 /*
-// bsp5.c
-
 #include "bsp5.h"
 
-//
 // command line flags
-//
 qboolean drawflag;
 qboolean nofill;
 qboolean notjunc;
-// divide.h
-
 #include "bsp5.h"
 #include <math.h>
 
-// tjunc.c
-
 #include "bsp5.h"
 
 
-
 #include "bsp5.h"
 
-
 int headclipnode;
 int firstface;
 
 #define VERSION "2.0"
+#include "../common/cmdlib.h"
+#include "../common/scriptlib.h"
+#include "../common/lbmlib.h"
+#include "../common/wadlib.h"
 #include "qlumpy.h"
 
 
-#include "cmdlib.h"
-#include "scriplib.h"
-#include "lbmlib.h"
-#include "wadlib.h"
-
-
-extern  byte    *byteimage, *lbmpalette;
-extern  int     byteimagewidth, byteimageheight;
+/* ../common/(cmdlib scriptlib lbmlib wadlib)^.h
+ * need to be included when this file is included */
+extern byte *byteimage, *lbmpalette;
+extern int  byteimagewidth, byteimageheight;
 
 #define SCRN(x,y)       (*(byteimage+(y)*byteimagewidth+x))
 
-extern  byte    *lump_p;
-extern  byte	*lumpbuffer;
+extern byte *lump_p;
+extern byte	*lumpbuffer;
 
-extern	char	lumpname[];
-
+extern char	lumpname[];

qlumpy/quakegrb.c

+#include "../common/cmdlib.h"
+#include "../common/scriptlib.h"
+#include "../common/lbmlib.h"
+#include "../common/wadlib.h"
 #include "qlumpy.h"
 
 typedef struct {