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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
--- log/src/Makefile.orig Wed Nov 5 04:53:39 2003
+++ log/src/Makefile Tue Dec 9 17:42:37 2003
@@ -45,8 +45,8 @@
CD = cd
-LOGLIBDIR = `$(CD) ../../log/lib; pwd`
-LIBDIR = `$(CD) ../../lib; pwd`
+LOGLIBDIR = ${PREFIX}/share/chipmunk
+LIBDIR = ${PREFIX}/share/chipmunk
LOCINC = ../../psys/include
@@ -63,9 +63,9 @@
## or some other directory, depending on your installation. Use the
## first one for OS X.
-XINCLUDEDIR = .
+XINCLUDEDIR = ${LOCALBASE}/include
-BINDIR = ../../bin
+BINDIR = ${PREFIX}/bin
LIBP2C = ../../psys/src/libp2c.a
##
@@ -81,7 +81,7 @@
## depending on your installation. Use the second one for OS X.
##
-LIBX11 = -lX11
+LIBX11 = -lX11 -L${LOCALBASE}/lib
##
## (2) Library additions
@@ -91,7 +91,7 @@
##
## on Sun Solaris 2.X, -lsocket -lnsl must be added to OTHERLIBS
-OTHERLIBS= -lm
+OTHERLIBS= -lm -lcompat
##
@@ -110,7 +110,7 @@
CHIPMUNKCC = gcc -O3
-CC = $(CHIPMUNKCC)
+CC ?= $(CHIPMUNKCC)
##
## (4) Adding appropriate flags
@@ -148,7 +148,7 @@
CHIPMUNKFLAGS =
-CFLAGS = $(CHIPMUNKFLAGS) -I$(LOCINC) -I$(XINCLUDEDIR) -DLOGLIB=\"$(LOGLIBDIR)\" -DF_OK=0
+CFLAGS += -DBSD -I$(LOCINC) -I$(XINCLUDEDIR) -DLOGLIB=\"$(LOGLIBDIR)\" -DF_OK=0
DIGOBJ = logsim.o logdig.o logsimasm.o logsimed.o diggates.o \
loghier.o logsimh.o swap.o
@@ -179,22 +179,24 @@
## older operating systems -- if problems arise, use a hard link.
##
+all: makeana main
+
install: all
- cp log $(BINDIR)/diglog
+ ${BSD_INSTALL_PROGRAM} log $(BINDIR)/diglog
-rm -f $(BINDIR)/analog
-(cd $(BINDIR); ln -s diglog analog)
- cp loged $(BINDIR)/loged
- cp fixfet7 $(BINDIR)/fixfet7
+ ${BSD_INSTALL_PROGRAM} loged $(BINDIR)/loged
+ ${BSD_INSTALL_SCRIPT} fixfet7 $(BINDIR)/fixfet7
+ cp -R ../lib/* $(LOGLIBDIR)
+ chmod -R a=r+X $(LOGLIBDIR)
clean:
-rm -f *.o ana/*.o ana/logdef.h log loged
-all: makeana main
-
main: log loged
makeana:
- ($(CD) ana; make $(MFLAGS) grab all)
+ ($(CD) ana; $(MAKE) $(MFLAGS) grab all)
LOGOBJ = log.o $(TOOLOBJ) logstuff.o logdef.o
|