-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·126 lines (111 loc) · 2.91 KB
/
Makefile
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Makefile for vogl
# Usage: make
#
# As well as selecting the devices, you may have to change LLIBS and MLIBS as well (see below).
#
SHELL = /bin/sh
#
CC = gcc
# The devices you wish to have compiled into the library and the location of the object files
# for each device relative to the src directory. For each device defined there should be a
# corresponding ../drivers/file.o in the DOBJS line.
#
# Possible DEVICES and their object files are:
# -DPOSTSCRIPT ../drivers/ps.o
# -DHPGL ../drivers/hpdxy.o
# -DDXY ../drivers/hpdxy.o
# -DTEK ../drivers/tek.o
# -DSUN ../drivers/sun.o (Sunview that is)
# -DX11 ../drivers/X11.o
# -DNeXT ../drivers/NeXT.o (NeXTStep)
#
DEVICES = -DPOSTSCRIPT -DX11
DOBJS = ../drivers/ps.o ../drivers/X11.o
#
# Where the fonts a going to live (For making the Hershey library)
# (Remember /tmp usually gets cleared from time to time)
#
LIB = libvogl.a
HLIB = libhershey.a
FONTLIB = /tmp/vogl
DEST = /tmp/vogl
INCDEST = /tmp/vogl
DIST = Dist
# RanLib
RANLIB = ranlib
# Set any Special floating point options here...
FLOATING_POINT = -ffast-math
#
# Global CFLAGS can be set here.
#
# The default
CFLAGS = -O -I/usr/local/R5/include -I/usr/include -g -O3 -fomit-frame-pointer -finline-functions -fexpensive-optimizations -DNO_MULTIBUF
#
# Define F77 if you want the f77 examples.
F77 = f77
# You also define your f77 flags here too. These are the ones we used on sun
FFLAGS = -O -w /usr/lib64/libm.a
#
# The name of the library to install and where to put it.
#
# X11
LLIBS = -lX11
LIBM = -lm
LIBS = $(LLIBS) $(LIBM)
MCFLAGS = $(CFLAGS) $(FLOATING_POINT)
MFFLAGS = $(FFLAGS)
#
all:
rm -rf $(DIST)
mkdir -p $(DIST)
cd src; make -f Makefile \
CC="$(CC)" \
DEVICES="$(DEVICES)" \
MCFLAGS="$(MCFLAGS)" \
DOBJS="$(DOBJS)"\
RANLIB="$(RANLIB)"
cd hershey/src; make -f Makefile \
CC="$(CC)" \
FONTLIB="$(FONTLIB)" \
MCFLAGS="$(MCFLAGS)" \
LIBS="$(LIBS)" \
RANLIB="$(RANLIB)"
cd examples; make -f Makefile \
CC="$(CC)" \
MCFLAGS="$(MCFLAGS)" \
LIBS="$(LIBS)"
if test -n "$(F77)" ; \
then cd examples; make -f Makefile.f77 \
LIBS="$(LIBS)" \
MFFLAGS="$(MFFLAGS)" \
F77="$(F77)" ; \
fi ; exit 0
fonts:
cd hershey/src; make -f Makefile \
CC="$(CC)" \
FONTLIB="$(FONTLIB)" \
MCFLAGS="$(MCFLAGS)" \
LIBS="$(LIBS)" \
RANLIB="$(RANLIB)"
#
install:
rm -rf $(DIST)
cp src/$(LIB) $(DEST)
cp hershey/src/$(HLIB) $(DEST)
cp src/*.h $(INCDEST)
chmod 644 $(DEST)/$(LIB)
chmod 644 $(DEST)/$(HLIB)
$(RANLIB) $(DEST)/$(LIB)
$(RANLIB) $(DEST)/$(HLIB)
cp -r $(DEST) $(DIST)
#
clean:
cd src; make DOBJS="$(DOBJS)" clean
cd hershey/src; make FONTLIB="$(FONTLIB)" clean
cd drivers; make clean
cd examples; make clean
cd examples/xt; make clean
cd examples/xview; make clean
cd examples/sunview; make clean
cd examples; make -f Makefile.f77 clean
#