File: Makefile

package info (click to toggle)
glui 2.1.0.beta-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,068 kB
  • ctags: 1,302
  • sloc: cpp: 9,043; ansic: 857; makefile: 235
file content (97 lines) | stat: -rw-r--r-- 2,569 bytes parent folder | download
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
VERSION  = 2.1
MAJOR    = 2
LIBNAME  = libglui
SONAME   = $(LIBNAME).so.$(MAJOR)

CC       = cc
CXX      = c++

CPPFLAGS = $(INCS)
CFLAGS   =
CXXFLAGS =
LDFLAGS  =
LDLIBS   = $(LIBS)

GLLIBS   = -lGL -lGLU -lglut
INCS     = 
LIBS     = $(GLLIBS) -lm

LIBGLUI  = -Llib -lglui

GLUI     = lib/$(LIBNAME).a
SO_GLUI  = lib/$(LIBNAME).so.$(VERSION)

EXAMPLES = bin/example1 bin/example2 bin/example3 bin/example4 bin/example5

all: static examples
static: $(GLUI)
shared: $(SO_GLUI)
examples: $(EXAMPLES)

GLUI_SRCS = algebra3.cpp arcball.cpp $(wildcard glui*.cpp) quaternion.cpp
GLUI_OBJS = $(GLUI_SRCS:.cpp=.o)

$(GLUI): $(GLUI_OBJS)
	@echo "Creating library"
	test -d $(dir $@) || mkdir -p $(dir $@)
	ar -r $@ $^

$(SO_GLUI): $(GLUI_OBJS)
	@echo "Creating shared library"
	$(CXX) -o $@ -shared -Wl,-soname,$(SONAME) $^ $(LDLIBS)

bin/example%: example%.o $(GLUI)
	@echo Linking $(notdir $@)
	test -d $(dir $@) || mkdir -p $(dir $@)
	$(CXX) $(LDFLAGS) $(LDLIBS) $< $(LIBGLUI) -o $@

.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $(INCS) $<

.c.o:
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCS) $<

clean:
	$(RM) *.o
	$(RM) -r bin libs
	$(RM) tags *~

.SUFFIXES: .cpp
.PHONY: all static shared examples

algebra3.o: algebra3.h
arcball.o: arcball.h algebra3.h quaternion.h
example1.o: glui.h
example2.o: glui.h
example3.o: glui.h
example4.o: glui.h
glui.o: glui.h
glui_add_controls.o: glui.h
glui_bitmap_img_data.o: glui_img_checkbox_0.c glui_img_checkbox_1.c
glui_bitmap_img_data.o: glui_img_radiobutton_0.c glui_img_radiobutton_1.c
glui_bitmap_img_data.o: glui_img_uparrow.c glui_img_downarrow.c
glui_bitmap_img_data.o: glui_img_leftarrow.c glui_img_rightarrow.c
glui_bitmap_img_data.o: glui_img_spinup_1.c glui_img_spinup_0.c
glui_bitmap_img_data.o: glui_img_spindown_1.c glui_img_spindown_0.c
glui_bitmap_img_data.o: glui_img_checkbox_0_dis.c glui_img_checkbox_1_dis.c
glui_bitmap_img_data.o: glui_img_radiobutton_0_dis.c
glui_bitmap_img_data.o: glui_img_radiobutton_1_dis.c glui_img_spinup_dis.c
glui_bitmap_img_data.o: glui_img_spindown_dis.c
glui_bitmaps.o: glui.h
glui_button.o: glui.h
glui_checkbox.o: glui.h
glui_column.o: glui.h
glui_control.o: glui.h
glui_edittext.o: glui.h
glui_node.o: glui.h
glui_panel.o: glui.h
glui_radio.o: glui.h
glui_separator.o: glui.h
glui_spinner.o: glui.h
glui_statictext.o: glui.h
quaternion.o: quaternion.h algebra3.h
glui_translation.o: glui.h
glui_rotation.o: glui.h
glui_mouse_iaction.o: glui.h
glui_listbox.o: glui.h
glui_rollout.o: glui.h