summaryrefslogtreecommitdiff
blob: 3ed7ad84e6d457c98104fbf4d5202a01f518a90c (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Fix the build system, removing hardcoded values for toolchain variables.

--- a/examples/makefile
+++ b/examples/makefile
@@ -6,7 +6,6 @@
 # want to compile.  See the README for a description of what each example does.
 # -----------------------------------------------------------------------------
 
-include ../makevars
 
 # Set these paths to the location of the GA library and headers.
 #GA_INC_DIR= /usr/local/include
@@ -14,8 +13,6 @@
 GA_INC_DIR= ..
 GA_LIB_DIR= ../ga
 
-INC_DIRS= -I$(GA_INC_DIR)
-LIB_DIRS= -L$(GA_LIB_DIR)
 
 EXS=randtest\
  ex1  ex2  ex3  ex4  ex5  ex6  ex7  ex8  ex9\
@@ -24,7 +21,7 @@
 
 .SUFFIXES: .C
 .C.o:
-	$(CXX) $(CXXFLAGS) $(INC_DIRS) -c $<
+	$(CXX) $(CXXFLAGS) -I.. -c $<
 
 all: $(EXS)
 
@@ -34,7 +31,7 @@
 
 # Use this for gnu make
 $(EXS): %: %.o
-	$(CXX) $@.o -o $@ $(LIB_DIRS) -lga -lm $(CXX_LIBS)
+	$(CXX) $@.o -o $@ -L../ga/ -lga -lm $(CXX_LIBS)
 
 clean:
 	$(RM) $(EXS)
--- a/ga/makefile
+++ b/ga/makefile
@@ -14,7 +14,7 @@
 
 $(LIB): $(OBJS) 
 	$(PRELINK)
-	$(AR) $(LIB) $?
+	$(AR) rv $(LIB) $?
 	$(RANLIB) $(LIB)
 	echo "$(CXX) $(CXXFLAGS)" > BUILD
 	@echo $(LIB) is now up-to-date
--- a/makevars
+++ b/makevars
@@ -31,12 +31,7 @@
 #  verified 06mar07 on linux-x86 (debian with gcc 3.3.5)
 #  verified 06mar07 on linux-x86 (ubuntu with gcc 4.0.3)
 #  verified 06mar07 on macosx-ppc (macosx 10.4.8 with gcc 4.0.1)
-CXX         = g++
-CXXFLAGS    = -g -Wall
-LD          = g++ -w
-AR          = ar rv
 INSTALL     = install -c
-RANLIB      = echo no ranlib
 
 # gcc2
 #  verified 28dec04 on linux-x86 (redhat 6.2 with gcc 2.95.2)