File: Makefile

package info (click to toggle)
sipp 3.1-9
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,268 kB
  • ctags: 744
  • sloc: ansic: 8,534; makefile: 304; lex: 65; sh: 14
file content (127 lines) | stat: -rw-r--r-- 2,814 bytes parent folder | download | duplicates (4)
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
127
#
# Makefile for the misc demos of SIPP.
#

# These values are used if not overruled from the command line
#CC = cc
CC = gcc -traditional
CFLAGS = -pipe -O2 -I/usr/include/sipp
#CFLAGS = -pipe -g -I../libsipp

LIBLINE = -lsipp

SHELL = /bin/sh
RM = rm -f



SRCS = torustest.c conetest.c ellipsoid.c prismtest.c chain.c scroll.c\
	teapot.c structure.c planettest.c isy90.c strausstest.c woodtest.c
PROGRAMS = torustest conetest ellipsoid prismtest chain scroll\
	teapot structure planettest isy90 strausstest 


all:
	@echo "If you want to make only the pretty images, type 'make pretty'."
	@echo "If you want to make only the test images, type   'make tests'."
	@echo "If you want to make all images, type             'make images'."
	@echo
	@echo "If you want to make the programs, but not the images,"
	@echo "type 'make programs'."
	@echo


# ================================================================


programs:  $(PROGRAMS)

#../libsipp/libsipp.a:
#	cd ..; $(MAKE) library


# ================================================================


teapot: teapot.o 
	$(CC) -o teapot teapot.o $(LIBLINE) -lm $(LIBS)
	
chain: chain.o 
	$(CC) -o chain chain.o $(LIBLINE) -lm $(LIBS)

structure: structure.o 
	$(CC) -o structure structure.o $(LIBLINE) -lm $(LIBS)

planettest: planettest.o 
	$(CC) -o planettest planettest.o $(LIBLINE) -lm $(LIBS)

isy90: isy90.o 
	$(CC) -o isy90 isy90.o $(LIBLINE) -lm $(LIBS)

ellipsoid:    ellipsoid.o 
	$(CC) -o ellipsoid ellipsoid.o $(LIBLINE) -lm $(LIBS)

torustest: torustest.o 
	$(CC) -o torustest torustest.o $(LIBLINE) -lm $(LIBS)

conetest: conetest.o 
	$(CC) -o conetest conetest.o $(LIBLINE) -lm $(LIBS)

prismtest: prismtest.o 
	$(CC) -o prismtest prismtest.o $(LIBLINE) -lm $(LIBS)

strausstest: strausstest.o 
	$(CC) -o strausstest strausstest.o $(LIBLINE) -lm $(LIBS)

woodtest: woodtest.o 
	$(CC) -o woodtest woodtest.o $(LIBLINE) -lm $(LIBS)

scroll: scroll.o 
	$(CC) -o scroll scroll.o $(LIBLINE) -lm $(LIBS)


# ================================================================


clean:
	$(RM) *~ .*~ *.o $(PROGRAMS) *.p?m TAGS

tags:
	etags $(SRCS)


# ================================================================

PRETTY = chain.ppm teapot.ppm structure.ppm planet.ppm isy90.ppm scroll.ppm
TESTS = torus.ppm cone.ppm ellipsoid.ppm prism.ppm strauss.ppm 
IMAGES = $(PRETTY) $(TESTS)

images: $(IMAGES)
pretty: $(PRETTY)
tests:  $(TESTS)

chain.ppm: chain
	chain
teapot.ppm: teapot
	teapot
structure.ppm: structure
	structure
planet.ppm: planettest
	planettest
isy90.ppm: isy90
	isy90
torus.ppm: torustest
	torustest
cone.ppm: conetest
	conetest
ellipsoid.ppm: ellipsoid
	ellipsoid
prism.ppm: prismtest
	prismtest
strauss.ppm: strausstest
	strausstest
scroll.ppm: scroll
	scroll

timing: $(PROGRAMS)
	for i in $(PROGRAMS); do echo $$i; time $$i; done