Commit | Line | Data |
---|---|---|
1ed9cade C |
1 | # A makefile for the stuff now in libg++/etc |
2 | ||
3 | # ------ source locations | |
4 | ||
5 | # source directory for libg++.a | |
6 | SRCDIR = ../../src | |
7 | ||
8 | # source include directory | |
9 | SRCIDIR= ../../g++-include | |
10 | ||
11 | # ------ installation destinations | |
12 | # ------ You will require write-permission on the destination directories | |
13 | # ------ in order to `make install' | |
14 | ||
15 | ||
16 | prefix =/usr/gnu | |
17 | ||
18 | # libg++.a destination | |
19 | LIBDIR = $(prefix)/lib | |
20 | ||
21 | # executables directory: location to install the genclass class generator | |
22 | BINDIR = $(prefix)/bin | |
23 | ||
24 | # location to install include file directory | |
25 | IDIR = $(prefix)/lib/g++-include | |
26 | ||
27 | ||
28 | # ------- System-dependent defines | |
29 | # ------- use the second form of each for SystemV (USG) | |
30 | ||
31 | # g++ flags | |
32 | OSFLAG= | |
33 | #OSFLAG = -DUSG | |
34 | ||
35 | # ld or ld++ flags | |
36 | OSLDFLAG = | |
37 | #OSLDFLAG= -lPW | |
38 | ||
39 | # how to install | |
40 | INSTALL=install -c | |
41 | #INSTALL=cp | |
42 | ||
43 | # ranlib if necessary | |
44 | RANLIB=ranlib | |
45 | #RANLIB=echo | |
46 | ||
47 | # which make? | |
48 | MAKE=make | |
49 | ||
50 | # not used, but convenient for those who preprocess things while compiling | |
51 | SHELL=/bin/sh | |
52 | ||
53 | ||
54 | # ------ compiler names | |
55 | ||
56 | # GNU C++ compiler name | |
57 | GXX = g++ | |
58 | #GXX=gcc | |
59 | ||
60 | # GNU CC compiler name (needed for some .c files in libg++.a) | |
61 | CC = gcc | |
62 | ||
63 | # GNU loader | |
64 | LDXX = $(LIBDIR)/gcc-ld++ | |
65 | ||
66 | # crt0+.o location (for dynamic loading tests) | |
67 | GXXCRT1=$(LIBDIR)/crt1+.o | |
68 | ||
69 | # ------ Other compilation flags | |
70 | # ------ modify as you like -- the ones here are sheer overkill | |
71 | ||
72 | GXX_OPTIMIZATION_FLAGS= -O -fstrength-reduce -felide-constructors -fschedule-insns -fdelayed-branch -fsave-memoized | |
73 | ||
74 | GCC_OPTIMIZATION_FLAGS= -O -fstrength-reduce -fdelayed-branch | |
75 | ||
76 | DEBUG_FLAGS= -g | |
77 | ||
78 | #use this only if you like to look at lots of useless messages | |
79 | VERBOSITY_FLAGS= -Wall -v | |
80 | ||
81 | GXX_INCLUDE_DIRS= -I$(SRCIDIR) -I. | |
82 | ||
83 | GCC_INCLUDE_DIRS= -I$(prefix)/lib/gcc-include -I/usr/include -I$(SRCIDIR) | |
84 | ||
85 | PIPE_AS= -pipe | |
86 | ||
87 | # Flags for all C++ compiles | |
88 | GXXFLAGS = $(OSFLAG) $(GXX_INCLUDE_DIRS) $(DEBUG_FLAGS) $(GXX_OPTIMIZATION_FLAGS) $(VERBOSITY_FLAGS) $(PIPE_AS) | |
89 | ||
90 | # Flags for all C compiles | |
91 | CFLAGS= $(OSFLAG) $(GCC_INCLUDE_DIRS) $(DEBUG_FLAGS) $(GCC_OPTIMIZATION_FLAGS) $(VERBOSITY_FLAGS) $(PIPE_AS) | |
92 | ||
93 | # g++ load time flags | |
94 | GXXLDFLAGS = -L$(SRCDIR) -lg++ -lm $(OSLDFLAG) | |
95 | ||
96 | # these flags tell test0 where ld++ and crt1+.o are | |
97 | TFLAGS = -DLDXX=\"$(LDXX)\" -DCRT1X=\"$(GXXCRT1)\" | |
98 | ||
99 | ||
100 | # g++ files should have extension .cc | |
101 | .SUFFIXES: .cc | |
102 | .cc.o: | |
103 | $(GXX) -I. $(GXXFLAGS) -c $< | |
104 | ||
105 | RM = rm -f | |
106 | ||
107 | all: tPlotFile3D | |
108 | ||
109 | run_tests: tPlotFile3D | |
110 | ./tPlotFile3D | |
111 | @echo use plot to look at the plot file test.pl | |
112 | ||
113 | tPlotFile3D: PlotFile3D.o tPlotFile3D.o | |
114 | $(GXX) $(GXXFLAGS) tPlotFile3D.o PlotFile3D.o $(GXXLDFLAGS) -o tPlotFile3D | |
115 | ||
116 | clean: | |
117 | rm -f *.o *~ \#* *.bak *.pl | |
118 | ||
119 | realclean: clean | |
120 | rm -f tPlotFile3D |