aboutsummaryrefslogtreecommitdiff
blob: 3d05ced52fb188aa2a4857def457ba8f5b877408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Patch provided by Walter Landry <wlandry at ucsd.edu>
for use within MBDyn

--- a/code/Makefile
+++ b/code/Makefile
@@ -5,7 +5,9 @@
 CFLAGS =	-O2
 OFLAGS =	-O2
 
-FILES.c=	main/user_params.c main/interface.c main/main.c \
+main_file=	 main/main.c
+
+libFILES.c=	main/user_params.c main/interface.c \
 		submain/balance.c submain/divide.c submain/submain.c \
 		input/input_assign.c \
 		input/check_input.c input/input.c input/input_geom.c \
@@ -87,11 +89,20 @@
 		util/update.c  util/vecout.c util/vecran.c \
                 util/vecscale.c 
 
+FILES.c=	$(libFILES.c) $(main_file)
+
 FILES.o=	$(FILES.c:.c=.o) 
 
+libFILES.o=	$(libFILES.c:.c=.o)
+
+all: ${DEST} ${DEST_DIR}/libchaco.a
 
 ${DEST}:	${FILES.o} Makefile
 		${CC} ${OFLAGS} ${FILES.o} -lm -o ${DEST}
+
+${DEST_DIR}/libchaco.a:	${libFILES.o} Makefile
+		ar r ${DEST_DIR}/libchaco.a ${libFILES.o}
+		ranlib ${DEST_DIR}/libchaco.a
 
 lint:
 		lint ${IFLAG} ${FILES.c} -lm
--- a/code/main/user_params.c
+++ b/code/main/user_params.c
@@ -98,7 +98,7 @@
 long      RANDOM_SEED = 7654321L;	/* Seed for random number generator */
 int       NSQRTS = 1000;	/* # square roots to precompute if coarsening */
 int       MAKE_VWGTS = FALSE;	/* Make vtx weights degrees+1? (TRUE/FALSE) */
-int       FREE_GRAPH = TRUE;	/* Free input graph data? (TRUE/FALSE) */
+int       FREE_GRAPH = FALSE;	/* Free input graph data? (TRUE/FALSE) */
 char     *PARAMS_FILENAME = "User_Params";	/* File of parameter changes */