-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
45 lines (31 loc) · 981 Bytes
/
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
CXX=g++
override CXXFLAGS+=-ansi -Werror -D_BSD_SOURCE -DANSI -fPIC -O3 -DL_LITTLE_ENDIAN -Ileptonica-1.68/src
LDFLAGS=-ltiff -ljpeg -lpng -lz -lm
.PHONY=all clean utils test
COMMON=autoCropCommon.o autocrop_remove_bg.o
LIB=leptonica-1.68/lib/nodebug/liblept.a
BIN=autoCropScribe autoCropFoldout
all : $(BIN) utils
autoCropScribe : autoCropScribe.o $(LIB) $(COMMON)
$(CXX) $(CXXFLAGS) -I/usr/X11R6/include $^ $(LDFLAGS) -o $@
autoCropFoldout : autoCropFoldout.o $(LIB) $(COMMON)
$(CXX) $(CXXFLAGS) -I/usr/X11R6/include $^ $(LDFLAGS) -o $@
leptonica-1.68/lib/nodebug/liblept.a :
-(cd leptonica-1.68/ && \
./configure && \
$(MAKE) && \
cd src/ && \
$(MAKE) && \
$(MAKE) -f makefile.static && \
cd ../prog/ && \
$(MAKE) )
utils :
-(cd tests && $(MAKE) )
%.o : %.c
$(CXX) $(CXXFLAGS) -c $^ -o $@
clean :
rm -vf *.o $(BIN) $(LIB)
-(cd leptonica-1.68 && $(MAKE) clean && \
cd ../tests && $(MAKE) clean)
test :
-(cd tests && $(MAKE) test)