File: Makefile

package info (click to toggle)
glfw 2.6-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,180 kB
  • ctags: 2,274
  • sloc: ansic: 16,424; sh: 424; asm: 306; makefile: 227; pascal: 86
file content (220 lines) | stat: -rw-r--r-- 7,551 bytes parent folder | download | duplicates (2)
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
###########################################################################
# GLFW top level Makefile
# $Date: 2007/03/30 20:17:42 $
# $Revision: 1.10 $
#
# This file works as a top level makefile for all supported systems and
# compilers. It builds both the GLFW link library and the supplied example
# programs.
###########################################################################

###########################################################################
# If your make program does not set the $(MAKE) variable correctly,
# uncomment the following line and make sure that the name of the make
# tool is correct.
###########################################################################
# MAKE = make


###########################################################################
# If no system/compiler is specified, display a list of available options
###########################################################################
default:
	@echo "This is the makefile for the GLFW link library and example programs."
	@echo "Type one of the following:"
	@echo "-----------------------------------------------------------------------------"
	@echo "  $(MAKE) win32-mgw         for MinGW32 for Windows"
	@echo "  $(MAKE) cross-mgw         for MinGW32 for Windows on a Unix machine" 
	@echo "  $(MAKE) cross-mgw-install to install the GLFW library and header"
	@echo "  $(MAKE) cross-mgw-clean   fo clean the GLFW library and header"
	@echo "  $(MAKE) win32-cygwin      for Cygwin for Windows"
	@echo "  $(MAKE) win32-lcc         for LCC-Win32 for Windows"
	@echo "  $(MAKE) win32-bcc         for Borland C++ Builder 5.x for Windows"
	@echo "  $(MAKE) win32-msvc        for MS Visual C++ 6.x for Windows"
	@echo "  $(MAKE) win32-ow          for OpenWatcom for Windows"
	@echo "  $(MAKE) win32-pellesc     for Pelles C for Windows"
	@echo "  $(MAKE) win32-clean       to remove any compiled files for Windows"
	@echo "  $(MAKE) cygwin-clean      to remove any compiled files for Cygwin/Windows"
	@echo "  $(MAKE) cygwin-install    to install the GLFW library and header into Cygwin"
	@echo "-----------------------------------------------------------------------------"
	@echo "  $(MAKE) x11               for Unix/X11 (auto-configuring)"
	@echo "  $(MAKE) x11-clean         to remove any compiled files for Unix/X11"
	@echo "  $(MAKE) x11-install       to install the GLFW library and header"
	@echo "-----------------------------------------------------------------------------"
	@echo "  $(MAKE) macosx-gcc        for GCC for Mac OS X (free Apple SDK)"
	@echo "  $(MAKE) macosx-clean      to remove any compiled files for Mac OS X"
	@echo "  $(MAKE) macosx-install    to install the GLFW library and header"
	@echo "-----------------------------------------------------------------------------"
	@echo "  $(MAKE) amigaos-gcc       for AmigaOS for GCC (Geek Gadgets)"
	@echo "  $(MAKE) amigaos-vbcc      for AmigaOS for VBCC"
	@echo "  $(MAKE) amigaos-clean     to remove any compiled files for AmigaOS"
	@echo "-----------------------------------------------------------------------------"
	@echo "  $(MAKE) dos-djgpp         for DOS for DJGPP"
	@echo "  $(MAKE) dos-clean         to remove any compiled files for DOS"
	@echo "-----------------------------------------------------------------------------"


###########################################################################
# List of example programs (used for cleanup)
###########################################################################
EXAMPLES = boing \
           gears \
           keytest \
           listmodes \
           mipmaps \
           mtbench \
           mthello \
           particles \
           pong3d \
           splitview \
           triangle \
           wave


###########################################################################
# Windows
###########################################################################

# Cleanup for Windows
win32-clean:
	@.\\compile.bat CLEAN

# Cleanup for Cygwin (Cygwin Make does not support local BAT-files)
cygwin-clean:
	cd lib/win32 && $(MAKE) -f Makefile.win32.cygwin clean
	cd examples  && $(MAKE) -f Makefile.win32.cygwin clean

cygwin-install: win32-cygwin
	cd lib/win32 && $(MAKE) -f Makefile.win32.cygwin install

# Cleanup for MinGW32 Cross compilation from Unix
cross-mgw-install: cross-mgw 
	cd lib/win32 && $(MAKE) -f Makefile.win32.cross-mgw install 

cross-mgw-clean:
	cd lib/win32 && $(MAKE) -f Makefile.win32.cross-mgw clean 
	cd examples  && $(MAKE) -f Makefile.win32.cross-mgw clean


# Windows, MinGW32
win32-mgw:
	@./compile.bat $(MAKE) mgw

# Cross compilation from unix to win32 
cross-mgw:
	cd lib/win32 && $(MAKE) -f Makefile.win32.cross-mgw
	cd examples  && $(MAKE) -f Makefile.win32.cross-mgw 

# Windows, Cygwin (Cygwin Make does not support local BAT-files)
win32-cygwin:
	cd lib/win32 && $(MAKE) -f Makefile.win32.cygwin
	cd examples  && $(MAKE) -f Makefile.win32.cygwin

# Windows, LCC-Win32
win32-lcc:
	@.\\compile.bat $(MAKE) lcc

# Windows, Borland C++ Builder Compiler 5.x
win32-bcc:
	@.\\compile.bat $(MAKE) bcc

# Windows, Microsoft Visual C++
win32-msvc:
	@.\\compile.bat $(MAKE) msvc

# Windows, OpenWatcom
win32-ow:
	@.\\compile.bat $(MAKE) ow

# Windows, Pelles C
win32-pellesc:
	@.\\compile.bat $(MAKE) pellesc


###########################################################################
# X11 (Unix and Unix-like systems)
###########################################################################

MAKEFILES_X11_IN  = lib/x11/Makefile.x11.in  examples/Makefile.x11.in
MAKEFILES_X11     = lib/x11/Makefile.x11     examples/Makefile.x11

# Cleanup for X11 (must be here due to generated makefile)
x11-clean:
	rm -f $(MAKEFILES_X11)
	rm -f config.log
	rm -f lib/x11/*.o
	rm -f lib/x11/libglfw.a
	rm -f lib/x11/libglfw.so
	rm -f lib/x11/libglfw.pc
	rm -f lib/x11/libglfw.pc.in
	cd examples; rm -f $(EXAMPLES)

# Auto configuration for X11
$(MAKEFILES_X11) : compile.sh $(MAKEFILES_X11_IN)
	@sh ./compile.sh

# X11
x11: $(MAKEFILES_X11)
	cd lib/x11;  $(MAKE) -f Makefile.x11
	cd examples; $(MAKE) -f Makefile.x11

# X11 install
x11-install: x11
	cd lib/x11;  $(MAKE) -f Makefile.x11 install


###########################################################################
# Mac OS X
###########################################################################

# Cleanup for Mac OS X
macosx-clean:
	cd lib/macosx; $(MAKE) -f Makefile.macosx.gcc clean
	cd examples;   $(MAKE) -f Makefile.macosx.gcc clean

# Mac OS X, GCC
macosx-gcc: macosx-gcc-library macosx-gcc-examples

macosx-gcc-library:
	cd lib/macosx; $(MAKE) -f Makefile.macosx.gcc

macosx-gcc-examples:
	cd examples;   $(MAKE) -f Makefile.macosx.gcc

# Mac OS X, GCC install
macosx-install: macosx-gcc-library
	cd lib/macosx; $(MAKE) -f Makefile.macosx.gcc install


###########################################################################
# AmigaOS
###########################################################################

# Cleanup for AmigaOS
amigaos-clean:
	@execute compile.ami CLEAN

# AmigaOS, VBCC
amigaos-vbcc:
	@execute compile.ami $(MAKE) vbcc

# AmigaOS, GCC
amigaos-gcc:
	@execute compile.ami $(MAKE) gcc


###########################################################################
# DOS
###########################################################################

# Cleanup for DOS
dos-clean:
	@rm -f lib/dos/*.o
	@rm -f lib/dos/libglfw.a
	@rm -f examples/*.exe

# DOS, DJGPP (GCC)
dos-djgpp:
	@cd lib\dos;  $(MAKE) -f Makefile.dos.djgpp
	@cd examples; $(MAKE) -f Makefile.dos.djgpp