-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (36 loc) · 897 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
48
49
# $Id: Makefile 18 2008-07-06 09:18:48Z Makhtar $
# For C++ folder
FLAGS=-Imalib/ -Lmalib/ -lmalib
CXX=clang++-4.0 -std=c++14 -g -Wall -fPIC $(FLAGS) -o $@
OBJS=malib.o malib2.o socket.o
MLIB=malib/libmalib.a
LINK=ld -o $@ $@.o $(FLAGS) $(MLIB)
#LINKPP=c++ -o $@ $@.o $(FLAGS)
all: bin
make $(MLIB)
@cd ..
bin :
@mkdir -p bin
$(MLIB):
cd malib; make; cd ..
# if [ ! -d "malib" ] then cd .. fi
strings:
$(CXX) $< strings.cpp $(MLIB) -lasprintf
divisors:
$(CXX) $< divisors.cpp -I/usr/local/include/fxt -lfxt
mv $@ bin/
fltkpipe:
$(CXX) $< `fltk-config --cxxflags` fltkpipe.cpp -lfltk -lXext -lX11 -lm
hellofltk:
$(CXX) $< `fltk-config --cxxflags` hellofltk.cpp -lfltk -lXext -lX11 -lm
lists:
echo # pass
elevator:
$(CXX) $< elevator.cpp -lpthread
@mv $@ bin/
.cpp: $(MLIB)
if [ ! -d "bin" ]; then \
make all; fi
$(CXX) $< $(MLIB)
@mv $@ bin/
@echo bin/$@ ":\t\tOK"