-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (37 loc) · 971 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
CC = g++
CPPFLAGS = -O2 -W -Wall -g
VBSRC = physics.cpp videoBall.cpp
PGSRC = physics.cpp pong.cpp
LYSRC = physics.cpp layers.cpp
VBOBJ = videoBall.o physics.o
PGOBJ = pong.o physics.o
LYOBJ = layers.o physics.o
LDLIBS = -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_video
LINK = physics
VBALL = videoBall
PONG = pong
LAYERS = layers
all: videoBall pong layers
# all: pong
clean:
rm -rf $(VBALL) $(PONG) $(LAYERS) *.o core* *.dSYM
videoBall: $(VBOBJ)
$(CC) -o$(VBALL) $(CPPFLAGS) $(VBSRC) $(LDLIBS)
pong: $(PGOBJ)
$(CC) -o$(PONG) $(CPPFLAGS) $(PGSRC) $(LDLIBS)
layers:$(LYOBJ)
$(CC) -o$(LAYERS) $(CPPFLAGS) $(LYSRC) $(LDLIBS)
videoBall.o: videoBall.cpp physics.h
$(CC) -c videoBall.cpp
physics.o: physics.cpp physics.h
$(CC) -c physics.cpp
pong.o: pong.cpp physics.h
$(CC) -c pong.cpp
# myprogam: main.o physics.o
# gcc -o myprogram main.o foo.o
#
# main.o: main.c foo.h
# gcc -c main.c
#
# foo.o: foo.c foo.h
# gcc -c foo.c