File: Makefile

package info (click to toggle)
pagetools 0.1-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 468 kB
  • sloc: cpp: 477; makefile: 38
file content (52 lines) | stat: -rw-r--r-- 1,413 bytes parent folder | download | duplicates (3)
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
C++ = c++
WARNINGS =      -pedantic
C_FLAGS =       -MMD $(WARNINGS) -O2
C++_FLAGS =     -MMD $(WARNINGS) -O2

INCLUDES =      -I .
.SUFFIXES:      $(.SUFFIXES) .cpp
PTLIB = libptformats.a libptraster.a libptutil.a

LIBUTILOBJ = util/bitutil.o 
LIBRASTEROBJ = raster/bwimage.o raster/deskewer.o
LIBFORMATSOBJ = formats/pbmfact.o formats/tifffact.o

LIBPBM = pbm
# For Debian systems, uncomment this
LIBPBM = netpbm

# need to update this every time the version number changes!
VERSION = 0.1

%.o:%.c
	$(CC) $(C_FLAGS) $< $(INCLUDES) -c -o $@

%.o:%.cpp
	$(C++) $(C++_FLAGS) $< $(INCLUDES) -fno-implicit-templates -c -o $@

all: libptutil.a libptraster.a libptformats.a pbm_findskew/pbm_findskew tiff_findskew/tiff_findskew

libptutil.a:     $(LIBUTILOBJ)
	ar rus $@ $(LIBUTILOBJ)

libptraster.a:     $(LIBRASTEROBJ)
	ar rus $@ $(LIBRASTEROBJ)

libptformats.a:     $(LIBFORMATSOBJ)
	ar rus $@ $(LIBFORMATSOBJ)


pbm_findskew/pbm_findskew:  pbm_findskew/pbm_findskew.o $(PTLIB)
	$(C++) pbm_findskew/pbm_findskew.o $(PTLIB) -l$(LIBPBM) -o $@ $(LDFLAGS)

tiff_findskew/tiff_findskew:  tiff_findskew/tiff_findskew.o $(PTLIB)
	$(C++) tiff_findskew/tiff_findskew.o $(PTLIB) -ltiff -o $@ $(LDFLAGS)


clean:
	rm -rf */*.o core *.d */*.d $(PTLIB) pbm_findskew/pbm_findskew tiff_findskew/tiff_findskew

-include *.d

release:
	tar zcvf pagetools-$(VERSION).tar.gz COPYING Makefile TODO index.html *.txt */*.h */*.cpp */*.1