-
Notifications
You must be signed in to change notification settings - Fork 937
/
Copy pathMakefile
56 lines (39 loc) · 1.09 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
CXXFLAGS=-g -Wall -O0 -I /usr/local/include
PNG_DPI=300
TEXES=$(wildcard *.tex)
PICS=$(wildcard *.pic)
TEX_PNGS=$(subst tex,png,$(TEXES))
PIC_PNGS=$(subst pic,png,$(PICS))
%.eps : %.pic
gpic $< | groff | ps2eps --loose --gsbbox > $@
%.eps : %.tex
latex $<
dvips $(basename $<)
ps2eps --loose --gsbbox < $(basename $<).ps > $(basename $<).eps
%.png : %.eps
eps2png --png16m -resolution $(PNG_DPI) $<
BINARIES=date_test date_unittest timestamp_unittest timezone_dump timezone_unittest
all: $(BINARIES)
doc: $(TEX_PNGS) $(PIC_PNGS)
$(PIC_PNGS): PNG_DPI=144
$(BINARIES):
$(CXX) $(CXXFLAGS) $(filter %.cc,$^) -o $@
date_test: Date.h Date.cc Date_test.cc
date_unittest: Date.h Date.cc Date_unittest.cc
timestamp_unittest: Timestamp.h Timestamp.cc Timestamp_unittest.cc
timezone_dump: TimeZone.h TimeZone.cc Date.cc TimeZone_dump.cc
timezone_unittest: TimeZone.h TimeZone.cc Date.cc TimeZone_unittest.cc
test: date_unittest
./date_unittest
clean:
rm -f *.aux
rm -f *.dvi
rm -f *.eps
rm -f *.log
rm -f *.mps
rm -f *.mpx
rm -f *.ps
rm -f *_unittest
clean-all: clean
rm -f *.png
rm -f $(BINARIES)