File: Makefile

package info (click to toggle)
yorick 1.5.08-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 7,508 kB
  • ctags: 7,937
  • sloc: ansic: 75,604; cpp: 1,282; lisp: 1,217; sh: 1,026; makefile: 616; fortran: 19
file content (101 lines) | stat: -rw-r--r-- 2,863 bytes parent folder | download
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
SHELL=/bin/sh
MAKE=make
include ../Make.cfg

CFLAGS=$(COPTIONS) -I. -I../play
X11LIB=$(XLIB) -lX11
CCLOAD=$(CC) $(LDOPTIONS) $(LDFLAGS)
SYS_LIBS=$(X11LIB) $(MATHLIB) $(FPELIB)

D_GISTPATH='-DGISTPATH="~/gist:~/Gist:$(Y_SITE)/g"'

OBJS=gist.o tick.o tick60.o engine.o gtext.o draw.o draw0.o clip.o \
  gread.o gcntr.o hlevel.o ps.o cgm.o xfancy.o xbasic.o
BOBJS=browser.o cgmin.o eps.o

all: gist

# always check to see whether ../play/libplay.a needs to be rebuilt
libgist:
	@cd ../play; $(MAKE)
	@$(MAKE) libgist.a

# libyor puts the object files in ../yorick/libyor.a instead of libgist.a
libyor:
	@cd ../play; $(MAKE)
	@$(MAKE) make.done

# make.done clobbers libyor.a if its rule actually runs
make.done: $(OBJS) ../play/libplay.a
	cp ../play/libplay.a ../yorick/libyor.a
	$(AR) r ../yorick/libyor.a $(OBJS)
	@touch $@

libgist.a: $(OBJS) ../play/libplay.a
	cp ../play/libplay.a $@
	$(AR) r $@ $(OBJS)
	$(RANLIB) $@

gist: libgist $(BOBJS) main.o
	$(CCLOAD) -o $@ main.o $(BOBJS) -L. -lgist $(SYS_LIBS)

bench: libgist bench.o main.o
	$(CCLOAD) -o $@ main.o bench.o -L. -lgist $(SYS_LIBS)

main.c: ../play/unix/pmain.c
	cp ../play/unix/pmain.c main.c

clean::
	rm -f *~ '#'* *.o *.a *.done core a.out main.c gist bench

distclean:: clean
	rm -f .gdbinit

config:
	@:

# ------------- dependencies -------------

# cgm.h: gist.h engine.h
# draw.h: gist.h
# engine.h: gist.h
# gtext.h: gist.h
# hlevel.h: gist.h
# ps.h: gist.h engine.h
# xbasic.h: gist.h engine.h play.h
# xfancy.h: xbasic.h

PLAY_H=../play/play.h
PSTDLIB_H=../play/pstdlib.h
PSTDIO_H=../play/pstdio.h
PLAY_ALL=$(PLAY_H) $(PSTDLIB_H) $(PSTDIO_H)

cgm.o: cgm.h gtext.h $(PLAY_ALL)  gist.h engine.h
clip.o: clip.h $(PSTDLIB_H)
draw.o: draw.c draw.h gtext.h $(PSTDLIB_H)  gist.h
	$(CC) $(CPPFLAGS) $(CFLAGS) $(NO_EXP10) -c draw.c
draw0.o: draw.h gtext.h $(PLAY_H) $(PSTDLIB_H)  gist.h
engine.o: engine.h gist.h draw.h $(PSTDLIB_H)
gcntr.o: gist.h
gist.o: gist.h engine.h clip.h $(PLAY_H) $(PSTDLIB_H)
gread.o: gread.c gist.h $(PLAY_ALL)
	$(CC) $(CPPFLAGS) $(CFLAGS) $(D_GISTPATH) -c gread.c
gtext.o: gtext.h  gist.h
hlevel.o: hlevel.h xbasic.h engine.h $(PSTDIO_H)  gist.h $(PLAY_H)
ps.o: ps.h gtext.h $(PLAY_H) $(PSTDIO_H)  gist.h engine.h
tick.o: tick.c gist.h
	$(CC) $(CPPFLAGS) $(CFLAGS) $(NO_EXP10) -c tick.c
tick60.o: gist.h
xbasic.o: xbasic.h gtext.h $(PSTDIO_H)  gist.h engine.h $(PLAY_H)
xfancy.o: xfancy.c xfancy.h draw.h  gist.h xbasic.h engine.h $(PLAY_H)
	$(CC) $(CPPFLAGS) $(CFLAGS) $(NO_EXP10) -c xfancy.c

browser.o: xbasic.h cgm.h cgmin.h eps.h   gist.h engine.h $(PLAY_ALL)
cgmin.o: cgmin.h engine.h $(PLAY_ALL)   gist.h
eps.o: eps.h ps.h gtext.h $(PSTDIO_H) $(PSTDLIB_H)   gist.h engine.h

bench.o: hlevel.h xfancy.h $(PLAY_ALL)  gist.h xbasic.h engine.h

# Always compile main.c with -g so new packages can be debugged.
main.o: main.c
	$(CC) $(CPPFLAGS) -I../play -g -c main.c