-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (35 loc) · 1.16 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
CC=g++
in=main.cpp
out=imdb.a
series=Series.o
episode=Episode.o
curlandclean=src/htmlfunctions/curlandclean.cpp
pugilib=src/pugixml/src/pugixml.o
curllib=src/libcurl/lib/.libs/libcurl.a
tidylib=src/tidy/tidy-html5-master/lib/libtidy.a
CFLAGS=-c
MTFLAG=-fopenmp -lpthread
tempdir=src/temp
ARC=ar rcs
all: $(out)
$(out):$(series) $(episode) curlandclean.o $(pugilib) $(tempdir)
ar rcs $(out) $(series) $(episode) curlandclean.o $(pugilib) $(tempdir)/*.o
$(tempdir):$(curllib) $(tidylib)
mkdir $(tempdir)
cd $(tempdir) && ar -x ../libcurl/lib/.libs/libcurl.a
cd $(tempdir) && ar -x ../tidy/tidy-html5-master/lib/libtidy.a
curlandclean.o:$(curlandclean)
$(CC) $(CFLAGS) $(curlandclean)
$(series):src/Series.cpp
$(CC) $(CFLAGS) $(MTFLAG) src/Series.cpp
$(episode):src/Episode.cpp
$(CC) $(CFLAGS) src/Episode.cpp
$(curllib):
cd src/libcurl && ./configure --disable-shared --without-zlib --without-ssl --without-libidn --disable-cookies --disable-crypto-auth --disable-ldap --disable-ldaps --without-librtmp
cd src/libcurl && $(MAKE)
$(pugilib):
cd src/pugixml/src && $(CC) $(CFLAGS) pugixml.cpp
$(tidylib):
cd src/tidy/tidy-html5-master && $(MAKE)
clean:
rm *.o