-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (33 loc) · 1006 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
46
47
CXX=g++
CXXFLAGS=-std=c++11 -g
LDFLAGS=-I./simlite
SRCS=$(wildcard simlite/*.cpp)
OBJS=$(subst .cpp,.o,$(SRCS))
all: simlite.a examples info
run: all
./examples/kravin
./examples/prenos
info:
@echo
@echo "Run examples with:"
@echo " ./examples/kravin"
@echo " ./examples/prenos"
clean:
rm -f simlite.a simlite/*.o
examples: kravin prenos
depend: .depend
.depend: $(SRCS)
rm -f ./.depend
$(CXX) $(CXXFLAGS) -MM $^>>./.depend;
simlite.a: $(filter-out $(BIN).o, $(OBJS))
ar -rcs $@ $(filter-out $(BIN).o, $(OBJS))
kravin: simlite.a examples/kravin.cpp
$(CXX) $(CXXFLAGS) $(LDFLAGS) examples/kravin.cpp -o examples/kravin simlite.a
prenos: simlite.a examples/prenos.cpp
$(CXX) $(CXXFLAGS) $(LDFLAGS) examples/prenos.cpp -o examples/prenos simlite.a
pack:
-rm *.zip || true
cp doc/dokumentace.pdf dokumentace.pdf
zip -r 01_xlucan01_xkello00.zip examples/kravin.cpp examples/prenos.cpp simlite/*.cpp simlite/*.h Makefile README.md dokumentace.pdf
rm dokumentace.pdf
include .depend