Lines 13-20
Link Here
|
13 |
# and glk.h, glkstart.h, and Make.glkloader in the include directory. |
13 |
# and glk.h, glkstart.h, and Make.glkloader in the include directory. |
14 |
|
14 |
|
15 |
GLKNAME = glkloader |
15 |
GLKNAME = glkloader |
16 |
GLKINCLUDEDIR = /usr/local/include/glk/ |
16 |
GLKINCLUDEDIR = /usr/include/glk/ |
17 |
GLKLIBDIR = /usr/local/lib/ |
17 |
GLKLIBDIR = /usr/lib/ |
18 |
|
18 |
|
19 |
# Pick a C compiler. |
19 |
# Pick a C compiler. |
20 |
#CC = cc |
20 |
#CC = cc |
Lines 22-31
Link Here
|
22 |
LINK = gcc |
22 |
LINK = gcc |
23 |
INSTALL = install -g 0 -o 0 |
23 |
INSTALL = install -g 0 -o 0 |
24 |
|
24 |
|
25 |
OPTIONS = -g -Wall -fPIC -DLINUX |
25 |
OPTIONS = -Wall -fPIC -DLINUX |
26 |
INCLUDEDIRS = -I$(GLKINCLUDEDIR) |
26 |
INCLUDEDIRS = -I$(GLKINCLUDEDIR) -I. |
27 |
|
27 |
|
28 |
CFLAGS = $(OPTIONS) $(INCLUDEDIRS) |
28 |
CFLAGS += $(OPTIONS) $(INCLUDEDIRS) |
29 |
LDFLAGS = -rdynamic |
29 |
LDFLAGS = -rdynamic |
30 |
LIBDIRS = |
30 |
LIBDIRS = |
31 |
LIBS = -ldl |
31 |
LIBS = -ldl |
Lines 45-59
Link Here
|
45 |
|
45 |
|
46 |
all: $(GLKLIBSTATIC) $(GLKLIBSHARED) $(GLKMAKEFILE) |
46 |
all: $(GLKLIBSTATIC) $(GLKLIBSHARED) $(GLKMAKEFILE) |
47 |
|
47 |
|
48 |
$(GLKLIBSTATIC): $(OBJS) |
48 |
$(GLKLIBSTATIC): $(OBJS) xpconfig/libxpconfig.la |
49 |
cd xpconfig && ./internal-build-script |
|
|
50 |
ar r $(GLKLIBSTATIC) $(OBJS) |
49 |
ar r $(GLKLIBSTATIC) $(OBJS) |
51 |
ranlib $(GLKLIBSTATIC) |
50 |
ranlib $(GLKLIBSTATIC) |
52 |
|
51 |
|
53 |
$(GLKLIBSHARED): $(OBJS) |
52 |
$(GLKLIBSHARED): $(OBJS) xpconfig/libxpconfig.la |
54 |
cd xpconfig && ./internal-build-script |
|
|
55 |
$(LINK) $(LDFLAGS) -shared -Wl,-soname,$(GLKLIBSHARED).$(MAJOR) -o $(GLKLIBSHARED).$(MAJOR).$(MINOR).$(MICRO) $(OBJS) $(LIBDIRS) $(LIBS) $(XPCONFIG) |
53 |
$(LINK) $(LDFLAGS) -shared -Wl,-soname,$(GLKLIBSHARED).$(MAJOR) -o $(GLKLIBSHARED).$(MAJOR).$(MINOR).$(MICRO) $(OBJS) $(LIBDIRS) $(LIBS) $(XPCONFIG) |
56 |
|
54 |
|
|
|
55 |
xpconfig/libxpconfig.la: |
56 |
cd xpconfig && ./internal-build-script |
57 |
|
57 |
$(GLKMAKEFILE): |
58 |
$(GLKMAKEFILE): |
58 |
echo LINKLIBS = $(LIBDIRS) $(LIBS) > $(GLKMAKEFILE) |
59 |
echo LINKLIBS = $(LIBDIRS) $(LIBS) > $(GLKMAKEFILE) |
59 |
echo GLKLIB = -l$(GLKNAME) >> $(GLKMAKEFILE) |
60 |
echo GLKLIB = -l$(GLKNAME) >> $(GLKMAKEFILE) |
Lines 72-78
Link Here
|
72 |
ln -s -f $(GLKLIBDIR)/$(GLKLIBSHARED).$(MAJOR).$(MINOR).$(MICRO) $(GLKLIBDIR)/$(GLKLIBSHARED).$(MAJOR).$(MINOR) |
72 |
ln -s -f $(GLKLIBDIR)/$(GLKLIBSHARED).$(MAJOR).$(MINOR).$(MICRO) $(GLKLIBDIR)/$(GLKLIBSHARED).$(MAJOR).$(MINOR) |
73 |
ln -s -f $(GLKLIBDIR)/$(GLKLIBSHARED).$(MAJOR).$(MINOR).$(MICRO) $(GLKLIBDIR)/$(GLKLIBSHARED).$(MAJOR) |
73 |
ln -s -f $(GLKLIBDIR)/$(GLKLIBSHARED).$(MAJOR).$(MINOR).$(MICRO) $(GLKLIBDIR)/$(GLKLIBSHARED).$(MAJOR) |
74 |
ln -s -f $(GLKLIBDIR)/$(GLKLIBSHARED).$(MAJOR).$(MINOR).$(MICRO) $(GLKLIBDIR)/$(GLKLIBSHARED) |
74 |
ln -s -f $(GLKLIBDIR)/$(GLKLIBSHARED).$(MAJOR).$(MINOR).$(MICRO) $(GLKLIBDIR)/$(GLKLIBSHARED) |
75 |
ldconfig |
|
|
76 |
|
75 |
|
77 |
uninstall: |
76 |
uninstall: |
78 |
rm -f $(GLKINCLUDEDIR)/$(GLKMAKEFILE) |
77 |
rm -f $(GLKINCLUDEDIR)/$(GLKMAKEFILE) |