-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (40 loc) · 1.21 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
CC = g++
CFLAGS = -Wall -Wextra -pedantic -static-libstdc++
LOGIN = xkapou04
FILES = Makefile feedreader.cpp protokol.pdf readme
FEEDREADERFILES = feedreader.cpp
LDFLAGS = -L/usr/local/ssl/lib
LDLIBS = -lssl -lcrypto
DOC_FOLDER = doc
DOC_NAME = manual
TEST_FOLDER = test
all: feedreader
feedreader: $(FEEDREADERFILES)
$(CC) $(CFLAGS) -o $@ $(FEEDREADERFILES) $(LDFLAGS) $(LDLIBS)
doc: $(DOC_FOLDER)/$(DOC_NAME).tex $(DOC_FOLDER)/literatura.bib
cd $(DOC_FOLDER) && latex $(DOC_NAME).tex
cd $(DOC_FOLDER) && bibtex $(DOC_NAME).aux
cd $(DOC_FOLDER) && latex $(DOC_NAME).tex
cd $(DOC_FOLDER) && latex $(DOC_NAME).tex
cd $(DOC_FOLDER) && dvips -t a4 $(DOC_NAME).dvi
cd $(DOC_FOLDER) && ps2pdf $(DOC_NAME).ps
mv $(DOC_FOLDER)/$(DOC_NAME).pdf $(DOC_NAME).pdf
clean:
rm -f *.o *.out feedreader *.tar.gz *~
rm -f ./$(DOC_FOLDER)/*.aux
rm -f ./$(DOC_FOLDER)/*.dvi
rm -f ./$(DOC_FOLDER)/*.ps
rm -f ./$(DOC_FOLDER)/*.bbl
rm -f ./$(DOC_FOLDER)/*.bbg
rm -f ./$(DOC_FOLDER)/*.log
rm -f ./$(DOC_FOLDER)/*.toc
rm -f ./$(DOC_FOLDER)/*.blg
rm -f ./$(DOC_FOLDER)/*.pdf
rm -f ./$(DOC_FOLDER)/*.out
rm -f ./$(TEST_FOLDER)/*.out
test: feedreader FORCE
echo "Test:"
mkdir -p $(TEST_FOLDER)
dos2unix runtest
./runtest
FORCE: ;