3 # Open Watcom makefile for Freeglut
\r
5 # wmake -f Makefile.wat {target}
\r
6 # Where target is one of:
\r
16 # WATCOM enviroment variable points to your Watcom installation directory
\r
17 # %WATCOM%\BINNT and %WATCOM%\BINW are in your path
\r
19 RELEASE_STATIC_DIR = release-static
\r
20 RELEASE_DYNAMIC_DIR = release-dynamic
\r
21 DEBUG_STATIC_DIR = debug-static
\r
22 DEBUG_DYNAMIC_DIR = debug-dynamic
\r
24 INCLUDE_DIR = ..\include
\r
25 SRC_DIR = ..\src\Common
\r
27 COMPILE_COMMON_OPTIONS = -i$(INCLUDE_DIR);$(%WATCOM)\h;$(%WATCOM)\h\nt -fp6 -w4 -e25 -wcd202 -bt=nt -mf -zq
\r
28 COMPILE_DEBUG_OPTIONS = -d3 -od -DDEBUG -D_DEBUG
\r
29 COMPILE_RELEASE_OPTIONS = -d0 -otexanh
\r
30 COMPILE_STATIC_OPTIONS = -DFREEGLUT_STATIC -6r
\r
31 COMPILE_DYNAMIC_OPTIONS = -DFREEGLUT_EXPORTS -6s -bd -bm
\r
32 COMPILE_OPTIONS = $(COMPILE_COMMON_OPTIONS) $(COMPILE_$(MODE)_OPTIONS) $(COMPILE_$(TYPE)_OPTIONS)
\r
35 LINK_OPTIONS = SYS nt_dll op m op maxe=25 op q op symf FIL
\r
38 LIB_COMMON_OPTIONS = -q -n -b
\r
39 LIB_DYNAMIC_OPTIONS =
\r
40 LIB_STATIC_OPTIONS = -c -p=512
\r
41 LIB_OPTIONS = $(LIB_COMMON_OPTIONS) $(LIB_$(TYPE)_OPTIONS)
\r
43 MAKE = wmake -h -f ..\Makefile.wat
\r
46 freeglut_callbacks.obj &
\r
47 freeglut_cursor.obj &
\r
48 freeglut_display.obj &
\r
51 freeglut_font_data.obj &
\r
52 freeglut_gamemode.obj &
\r
53 freeglut_geometry.obj &
\r
54 freeglut_glutfont_definitions.obj &
\r
56 freeglut_input_devices.obj &
\r
57 freeglut_joystick.obj &
\r
61 freeglut_overlay.obj &
\r
62 freeglut_spaceball.obj &
\r
63 freeglut_state.obj &
\r
64 freeglut_stroke_mono_roman.obj &
\r
65 freeglut_stroke_roman.obj &
\r
66 freeglut_structure.obj &
\r
67 freeglut_teapot.obj &
\r
68 freeglut_videoresize.obj &
\r
73 @echo wmake -f Makefile.wat {target}
\r
74 @echo Where target is one of:
\r
77 @echo release-static
\r
78 @echo release-dynamic
\r
85 freeglut_static.lib : $(OBJ_FILES)
\r
86 $(LIB_TOOL) $(LIB_OPTIONS) $^* $(OBJ_FILES)
\r
88 # dynamic link library
\r
89 freeglut.dll : $(OBJ_FILES)
\r
90 $(LINKER) name $^* $(LINK_OPTIONS) $(OBJ_FILES: =,)
\r
92 freeglut.lib : freeglut.dll
\r
93 $(LIB_TOOL) $(LIB_OPTIONS) $^. +$[.
\r
96 freeglut_callbacks.obj : $(SRC_DIR)\freeglut_callbacks.c
\r
97 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
99 freeglut_cursor.obj : $(SRC_DIR)\freeglut_cursor.c
\r
100 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
102 freeglut_display.obj : $(SRC_DIR)\freeglut_display.c
\r
103 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
105 freeglut_ext.obj : $(SRC_DIR)\freeglut_ext.c
\r
106 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
108 freeglut_font.obj : $(SRC_DIR)\freeglut_font.c
\r
109 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
111 freeglut_font_data.obj : $(SRC_DIR)\freeglut_font_data.c
\r
112 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
114 freeglut_gamemode.obj : $(SRC_DIR)\freeglut_gamemode.c
\r
115 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
117 freeglut_geometry.obj : $(SRC_DIR)\freeglut_geometry.c
\r
118 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
120 freeglut_glutfont_definitions.obj : $(SRC_DIR)\freeglut_glutfont_definitions.c
\r
121 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
123 freeglut_init.obj : $(SRC_DIR)\freeglut_init.c
\r
124 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
126 freeglut_input_devices.obj : $(SRC_DIR)\freeglut_input_devices.c
\r
127 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
129 freeglut_joystick.obj : $(SRC_DIR)\freeglut_joystick.c
\r
130 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
132 freeglut_main.obj : $(SRC_DIR)\freeglut_main.c
\r
133 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
135 freeglut_menu.obj : $(SRC_DIR)\freeglut_menu.c
\r
136 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
138 freeglut_misc.obj : $(SRC_DIR)\freeglut_misc.c
\r
139 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
141 freeglut_overlay.obj : $(SRC_DIR)\freeglut_overlay.c
\r
142 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
144 freeglut_spaceball.obj : $(SRC_DIR)\freeglut_spaceball.c
\r
145 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
147 freeglut_state.obj : $(SRC_DIR)\freeglut_state.c
\r
148 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
150 freeglut_stroke_mono_roman.obj : $(SRC_DIR)\freeglut_stroke_mono_roman.c
\r
151 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
153 freeglut_stroke_roman.obj : $(SRC_DIR)\freeglut_stroke_roman.c
\r
154 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
156 freeglut_structure.obj : $(SRC_DIR)\freeglut_structure.c
\r
157 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
159 freeglut_teapot.obj : $(SRC_DIR)\freeglut_teapot.c
\r
160 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
162 freeglut_videoresize.obj : $(SRC_DIR)\freeglut_videoresize.c
\r
163 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
165 freeglut_window.obj : $(SRC_DIR)\freeglut_window.c
\r
166 $(COMPILER) $(SRC_DIR)\$[. $(COMPILE_OPTIONS)
\r
169 @-del $(DEBUG_STATIC_DIR)\*.obj
\r
170 @-del $(DEBUG_DYNAMIC_DIR)\*.obj
\r
171 @-del $(RELEASE_STATIC_DIR)\*.obj
\r
172 @-del $(RELEASE_DYNAMIC_DIR)\*.obj
\r
173 @echo All object files removed
\r
175 debug-static : .SYMBOLIC
\r
176 @-if not exist $(DEBUG_STATIC_DIR)\. mkdir $(DEBUG_STATIC_DIR)
\r
177 @-cd $(DEBUG_STATIC_DIR)
\r
178 @$(MAKE) MODE=DEBUG TYPE=STATIC freeglut_static.lib
\r
180 @echo Debug static library up to date
\r
182 debug-dynamic : .SYMBOLIC
\r
183 @-if not exist $(DEBUG_DYNAMIC_DIR)\. mkdir $(DEBUG_DYNAMIC_DIR)
\r
184 @-cd $(DEBUG_DYNAMIC_DIR)
\r
185 @$(MAKE) MODE=DEBUG TYPE=DYNAMIC freeglut.lib
\r
187 @echo Debug dynamic link library up to date
\r
189 release-static : .SYMBOLIC
\r
190 @-if not exist $(RELEASE_STATIC_DIR)\. mkdir $(RELEASE_STATIC_DIR)
\r
191 @-cd $(RELEASE_STATIC_DIR)
\r
192 @$(MAKE) MODE=RELEASE TYPE=STATIC freeglut_static.lib
\r
194 @echo Release static library up to date
\r
196 release-dynamic : .SYMBOLIC
\r
197 @-if not exist $(RELEASE_DYNAMIC_DIR)\. mkdir $(RELEASE_DYNAMIC_DIR)
\r
198 @-cd $(RELEASE_DYNAMIC_DIR)
\r
199 @$(MAKE) MODE=RELEASE TYPE=DYNAMIC freeglut.lib
\r
201 @echo Release dynamic link library up to date
\r
203 debug : debug-static debug-dynamic .SYMBOLIC
\r
204 @echo Debug targets up to date
\r
206 release : release-static release-dynamic .SYMBOLIC
\r
207 @echo Release targets up to date
\r
209 all : debug release .SYMBOLIC
\r
210 @echo All targets up to date
\r