-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmakefile.osmesa
More file actions
58 lines (44 loc) · 1.7 KB
/
Copy pathmakefile.osmesa
File metadata and controls
58 lines (44 loc) · 1.7 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
CC=gcc
# Comment these out to disable PNG output if no PNG lib is available.
#
PNG_FLAGS=-DUSE_PNG
PNG_LIBS= -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=-DOSMESA_OPTION -DOFFSCREEN_ONLY -IMesa-5.0.1/include
OFFSCREEN_LIBS= -LMesa-5.0.1/src/.libs -LMesa-5.0.1/src-glu/.libs -LMesa-5.0.1/src/OSmesa/.libs -lOSMesa -lstdc++
# NOTE: Mesa Offscreen lib is not required in some older? version of Mesa?
# Comment these out to disable the test GUI made with MUI.
#
#GUI_FLAGS=-DTEST_MUI_GUI
#GUI_SRC=ldglgui.c
#GUI_LIBS=-lmui
CFLAGS=-g -DUNIX -DUSE_OPENGL -DUSE_L3_PARSER -DUSE_BMP8 -DNEED_MIN_MAX $(PNG_FLAGS) $(TR_FLAGS) $(OFFSCREEN_FLAGS) $(GUI_FLAGS)
## 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 L3Edit.c L3Math.c L3Input.c L3View.c hoser.c plugstub.c $(TR_SRC) $(GUI_SRC) osmglut.c
OBJS = $(SRCS:.c=.o)
all : ldglite
ldglite: $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o ldglite $(PNG_LIBS) -static $(OFFSCREEN_LIBS) $(GUI_LIBS) -lGLU -lGL -dynamic -lpthread -lm
rm -rf l3glite
ln -s ldglite l3glite
rm -rf l3gledit
ln -s ldglite l3gledit
l3glite: ldglite
ldglitepng: ldglite
l3glitepng: ldglite
## 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
clean:
rm *.o