-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmakefile.freeglut
More file actions
70 lines (53 loc) · 2.12 KB
/
Copy pathmakefile.freeglut
File metadata and controls
70 lines (53 loc) · 2.12 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
69
CC=gcc
# Comment these out to disable PNG output if no PNG lib is available.
#
PNG_FLAGS=-DUSE_PNG
PNG_LIBS=-L. -lpng -lz
# Comment these out to disable tile rendering option.
#
TR_FLAGS=-DTILE_RENDER_OPTION
TR_SRC=tr.c
# UnComment this to build in support for Mesa Offscreen rendering
OFFSCREEN_FLAGS=-DWIN_DIB_OPTION
OFFSCREEN_LIBS= -lgdi32
# Comment these out to disable the test GUI made with MUI.
#
GUI_FLAGS=-DTEST_MUI_GUI -I./mui/include
GUI_SRC=ldglgui.c
GUI_LIBS=-L./mui/lib/mui -lfreeglutmui
LIBS = mui/lib/mui/libfreeglutmui.a
RES_SRC=ldglite.rc
# NOTE: -mwindows makes it detach from the console.
# This is good for gui apps but bad if launched from dos
# because we lose stdin. Perhaps I should make 2 versions
# or make it a makefile option.
#
CFLAGS=-ggdb -DUSING_FREEGLUT -DUSE_OPENGL -DUSE_L3_PARSER -DUSE_BMP8 $(PNG_FLAGS) $(TR_FLAGS) $(OFFSCREEN_FLAGS) $(GUI_FLAGS)
#CFLAGS=-ggdb -DUSE_OPENGL -DUSE_L3_PARSER -DUSE_BMP8 $(PNG_FLAGS) $(TR_FLAGS) $(OFFSCREEN_FLAGS) $(GUI_FLAGS) -mwindows
AR = ar
RANLIB = ranlib
## This is lame. I don't know how to do both .c and .cpp for the OBJS line
## so I pretend L3*.cpp is L3*.c and make rules for them later.
#
SRCS = ldliteVR_main.c platform.c dirscan.c gleps.c camera.c f00QuatC.c quant.c stub.c lcolors.c y.tab.c lex.yy.c qbuf.c main.c ldglpr.c glfont.c L3Edit.c L3Math.c L3Input.c L3View.c hoser.c ldglmenu.c $(TR_SRC) $(GUI_SRC)
OBJS = $(SRCS:.c=.o) $(RES_SRC:.rc=.o)
all : ldglite
ldglite: $(OBJS) $(LIBS)
$(CC) $(CFLAGS) $(OBJS) -o ldglite.exe -I. $(PNG_LIBS) $(OFFSCREEN_LIBS) $(GUI_LIBS) -lfreeglut -lglu32 -lopengl32 -lwinmm -lgdi32
cp ldglite.exe l3glite.exe
cp ldglite.exe l3gledit.exe
mui/lib/mui/libfreeglutmui.a:
if [ -d mui/lib/mui ] ; then cd mui/lib/mui ; $(MAKE) -f Makefile.freeglut $@ ; fi
l3glite: ldglite
ldglitepng: ldglite
l3glitepng: ldglite
ldglite.o: ldglite.rc
windres -i ldglite.rc -o ldglite.o
## This is lame. I don't know how to do both .c and .cpp for the OBJS line.
#
L3Math.o: L3Math.cpp
$(CC) -c $(CFLAGS) L3Math.cpp
L3Input.o: L3Input.cpp
$(CC) -c $(CFLAGS) L3Input.cpp
L3View.o: L3View.cpp
$(CC) -c $(CFLAGS) L3View.cpp