-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
50 lines (42 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
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++
CFLAGS = -Wall -O2 -g $(INCLUDES)
LDFLAGS = $(LIBS)
all: $(OUT)
$(OUT): lib/libnvstusb.a $(OBJ)
@echo ""
@echo "============================================================"
@echo " Linking..."
@echo "============================================================"
$(CXX) -o $@ $(OBJ) $(LDFLAGS)
@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) -c $(CFLAGS) -o $@ $<
clean:
make -C lib clean
rm -f $(OUT) $(OBJ) lib/libnvstusb.a