forked from bobsomers/3dvgl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (42 loc) · 1.23 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
SRC = src/main.cpp src/scene.cpp src/screenshot.cpp
OBJ = $(SRC:.cpp=.o)
OUT = 3dvgl
INCLUDES = -Isrc \
-Ilib
LIBS = -Llib \
-lnvstusb \
-lGL \
-lGLU \
-lglut \
-lX11 \
-lXxf86vm \
-lpthread \
-lusb-1.0
CXX ?= g++
CXXFLAGS ?= -Wall -O2 -g
CPPFLAGS += $(INCLUDES)
all: $(OUT)
$(OUT): lib/libnvstusb.a $(OBJ)
@echo ""
@echo "============================================================"
@echo " Linking..."
@echo "============================================================"
$(CXX) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
@echo ""
@echo "============================================================"
@echo " Done."
@echo "============================================================"
lib/libnvstusb.a:
@echo "============================================================"
@echo " Building libnvstusb from source..."
@echo "============================================================"
make -C lib
@echo ""
@echo "============================================================"
@echo " Building demo application..."
@echo "============================================================"
.cpp.o:
$(CXX) $(CPPFLAGS) -c $(CXXFLAGS) -o $@ $<
clean:
make -C lib clean
rm -f $(OUT) $(OBJ) lib/libnvstusb.a