blob: af4c3a29b184f6cb5b1da442040695a989a119f6 (
plain) (
blame)
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
|
# Shave and a Haircut
# (c) 2019 Epic Games
# US Patent 6720962
thisMakefile := $(lastword $(MAKEFILE_LIST))
ifeq ($(thisMakefile),)
$(error It looks you have a broken 'make'. If you are on an FC4 system try copying utils/make-3.81-fc4 into /usr/local/bin and renaming it 'make')
endif
#
# Linux
#
arch = $(shell ../utils/getarch.sh)
osVersion = $(shell ../utils/getos.sh)
CC = gcc
XLIBS_L = -L/usr/X11R6/lib -lXi -lXmu
ifdef SHAVE_PROFILE
profile := 1
endif
ifdef profile
PROF_FLAGS = -g
endif
ifndef SHAVE_OPT
SHAVE_OPT = -O3
endif
VARIANT_FLAGS=
# This is a space-seprated list of source files which do not affect the
# compilation of the shave library.
NON_LIB_SOURCES =
LIB_SOURCES = $(filter-out $(NON_LIB_SOURCES),$(wildcard *.c) $(wildcard *.cpp) $(wildcard *.h))
default:
@echo "Specify which flavour of library to build."
libAWLINUX-x64:
$(MAKE) -f $(thisMakefile) shavelibAW-x64.a VARIANT_FLAGS="$(SHAVE_OPT) -m64 -fPIC"
libAWLINUX2-x64:
$(MAKE) -f $(thisMakefile) shavelibAW2-x64.a VARIANT_FLAGS="$(SHAVE_OPT) -m64 -fPIC -DALTERNATE_DEFS"
libAWLINUXdbg-x64:
$(MAKE) -f $(thisMakefile) shavelibAW-x64.a VARIANT_FLAGS="-O0 -g -ggdb -fno-inline -m64 -fPIC"
libAWLINUX2dbg-x64:
$(MAKE) -f $(thisMakefile) shavelibAW2-x64.a VARIANT_FLAGS="-O0 -g -ggdb -fno-inline -m64 -fPIC -DALTERNATE_DEFS"
ifneq ($(VARIANT_FLAGS),)
shavelibAW-x64.a: shavelib1forAWLINUX.o
rm -f $@
ar r $@ $^
shavelibAW2-x64.a: shavelib1forAWLINUX.o
rm -f $@
ar r $@ $^
shavelib1forAWLINUX.o: $(LIB_SOURCES)
$(CC) -fvisibility=hidden shavelib1forAWLINUX.c -c $(PROF_FLAGS) $(VARIANT_FLAGS)
endif
libAWLINUXEXT-x64:
$(CC) -shared -fPIC shavelib1forAWLINUX.c -m64 -fPIC \
$(SHAVE_OPT) -lGL -DEXTPRIM -o libShaveEngine-x64.so
libAWLINUXEXTdbg-x64:
$(CC) -shared -fPIC shavelib1forAWLINUX.c -m64 -fPIC -O0 \
-g -lGL -DEXTPRIM -o libShaveEngine-x64.so
cleanIntermediates:
rm -f *.o
cleanAll-x64:
rm -f *.o shavelibAW-x64.a shavelibAW2-x64.a libShaveEngine-x64.so
|