-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile.in
81 lines (62 loc) · 2.35 KB
/
Makefile.in
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
top_builddir=.
CC=@CC@ @CPPFLAGS@ @CFLAGS@ @DEFS@ -fPIC -I. -Isrc -DCHECKS -Wno-unused-function
L=@CC@ @CFLAGS@ -fPIC
A=a
SO=so
AR=ar
RANLIB=@RANLIB@
EXE=@EXEEXT@
LIBS=-lm
O=@OBJEXT@
INSTALL=@INSTALL@
PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
libdir=@libdir@
SRC_FILES = active.c convert.c poly.c wind.c render.c xrow.c stroke.c moments.c dict.c gfxline.c
SRC_HEADERS = active.h convert.h poly.h wind.h render.h xrow.h stroke.h moments.h dict.h gfxline.h heap.h
SRC_OBJECTS = $(addsuffix .o,$(basename $(SRC_FILES)))
OBJECTS=$(addprefix src/, $(SRC_OBJECTS))
SOURCES = gfxpoly.h $(addprefix src/, $(SRC_FILES)) $(addprefix src/, $(SRC_HEADERS))
EXAMPLES=examples/logo$(EXE) examples/triangles$(EXE)
TESTS=tests/run_ps$(EXE)
all: libgfxpoly.$(A) libgfxpoly.$(SO)
examples: $(EXAMPLES)
tests: $(TESTS)
tests/run_ps tests/polygons
%.o: %.c
$(CC) -c $< -o $@
src/active.o: src/active.c src/active.h src/poly.h
src/convert.o: src/convert.c src/convert.h src/poly.h
src/poly.o: src/poly.c src/poly.h src/active.h src/heap.h
src/wind.o: src/wind.c src/wind.h src/poly.h
src/dict.o: src/dict.c src/dict.h
src/render.o: src/render.c src/wind.h src/poly.h src/render.h
src/xrow.o: src/xrow.c src/xrow.h
src/stroke.o: src/stroke.c src/poly.h src/convert.h src/wind.h
src/moments.o: src/moments.c src/moments.h
src/gfxline.o: src/gfxline.c src/gfxline.h
examples/logo.o: examples/logo.c src/*.h examples/ttf.h
examples/triangles.o: examples/triangles.c src/*.h examples/ttf.h
examples/ttf.o: examples/ttf.c examples/ttf.h
tests/run_ps.o: tests/run_ps.c gfxpoly.h
libgfxpoly.$(A): $(OBJECTS)
$(AR) cru $@ $(OBJECTS)
$(RANLIB) $@
libgfxpoly.$(SO): $(OBJECTS)
$(L) -shared $(OBJECTS) -o $@
examples/logo$(EXE): examples/logo.o examples/ttf.o libgfxpoly.$(A)
$(L) examples/logo.o examples/ttf.o libgfxpoly.$(A) -o $@ $(LIBS) -lpdf
examples/triangles$(EXE): examples/triangles.o examples/ttf.o libgfxpoly.$(A)
$(L) examples/triangles.o examples/ttf.o libgfxpoly.$(A) -o $@ $(LIBS) -lpdf
tests/run_ps$(EXE): tests/run_ps.o libgfxpoly.$(A)
$(L) tests/run_ps.o libgfxpoly.$(A) -o $@ $(LIBS)
install:
cp gfxpoly.h $(includedir)
cp libgfxpoly.$(A) $(libdir)
cp libgfxpoly.$(SO) $(libdir)/libgfxpoly.$(SO).$(PACKAGE_VERSION)
clean:
rm -f src/*.o examples/*.o libgfxpoly.$(A) libgfxpoly.$(SO)
.PHONY: tests examples