summaryrefslogtreecommitdiff
path: root/graphics/asymptote/prc/Makefile
blob: 23dd32aa3bd561e200468a806fe942545249da77 (plain)
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
# Makefile.

CFLAGS = -O3 -g -Wall
CXX = g++

MAKEDEPEND = $(CFLAGS) -O0 -M -DDEPEND

FILES = PRCbitStream oPRCFile PRCdouble writePRC

all: $(FILES:=.o)

#test: $(FILES:=.o) test.o
#	$(CXX) $(CFLAGS) -o test $(FILES:=.o) test.o -lz

#test_tess: $(FILES:=.o) test_tess.o
#	$(CXX) $(CFLAGS) -o test_tess $(FILES:=.o) test_tess.o -lz

#test_mesh: $(FILES:=.o) test_mesh.o
#	$(CXX) $(CFLAGS) -o test_mesh $(FILES:=.o) test_mesh.o -lz

.SUFFIXES: .c .cc .o .d
.cc.o:
	$(CXX) $(CFLAGS) $(INCL) -o $@ -c $<
.cc.d:
	@echo Creating $@; \
	rm -f $@; \
	${CXX} $(MAKEDEPEND) $(INCL) $(MDOPTS) $< > $@.$$$$ 2>/dev/null && \
	sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
	rm -f $@.$$$$
.c.d:
	@echo Creating $@; \
	rm -f $@; \
	${CC} $(MAKEDEPEND) $(INCL) $(MDOPTS) $< > $@.$$$$ 2>/dev/null && \
	sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
	rm -f $@.$$$$

ifeq (,$(findstring clean,${MAKECMDGOALS}))
-include $(FILES:=.d)
endif

clean:
	rm -f *.o *.d test test_tess