Makefile
1.36 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
CC=gcc
CPP=g++
MAKE=make
LD=ld
# CFLAGS=-ggdb
CXXFLAGS=
LDFLAGS_X11=-L/usr/X11R6/lib -lX11 -lXext
INC_X11=-I/usr/X11R6/include
# LDFLAGS=$(LDFLAGS_X11) -lefence
LDFLAGS=$(LDFLAGS_X11)
INC=$(INC_X11)
OBJECTS=gra_app.o dispatcher.o event_source.o rasterize.o
XWIN_OBJ=xwin/canvas_x11.o xwin/canvas_x11_shm.o xwin/disp_x11.o xwin/xclass.o
GEOM_OBJ=geometry/vertex.o geometry/polygon.o geometry/polyeder.o
HELPER_OBJ=
MATH_OBJ=math/sin_cos.o
CANVAS_IMP_OBJ=canvas_imps/canvas_imp_rgb.o
OBJ=$(OBJECTS) $(GEOM_OBJ) $(HELPER_OBJ) $(MATH_OBJ) $(XWIN_OBJ)
OBJ+=$(CANVAS_IMP_OBJ)
%.o: %.cpp
$(CPP) $(CFLAGS) $(CXXFLAGS) $(INC) -c $*.cpp
.PHONY : all geometry helper math xwin canvas_imps geometry_clean helper_clean math_clean xwin_clean canvas_imps_clean clean
all: engage
engage: geometry helper math xwin canvas_imps $(OBJECTS)
$(CPP) $(CFLAGS) $(CXXFLAGS) $(INC) $(LDFLAGS) -o $@ $(OBJ)
geometry:
@cd geometry && $(MAKE)
helper:
@cd helper && $(MAKE)
math:
@cd math && $(MAKE)
xwin:
@cd xwin && $(MAKE)
canvas_imps:
@cd canvas_imps && $(MAKE)
geometry_clean:
@cd geometry && $(MAKE) clean
helper_clean:
@cd helper && $(MAKE) clean
math_clean::
@cd math && $(MAKE) clean
xwin_clean::
@cd xwin && $(MAKE) clean
canvas_imps_clean::
@cd canvas_imps && $(MAKE) clean
clean: geometry_clean helper_clean math_clean xwin_clean canvas_imps_clean
@rm -f gra_app
@rm -f *.o