-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (36 loc) · 1023 Bytes
/
Makefile
File metadata and controls
53 lines (36 loc) · 1023 Bytes
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
#
# SUMMON - Linux Makefile
#
# install prefix (can overload on command line)
prefix = /usr
# python version (can be 2.4 or greater)
PYTHON_VERSION = 2.6
# python install location
PYTHON_PREFIX = $(prefix)/lib/python$(PYTHON_VERSION)/site-packages/
# python include path
PYTHON_INCLUDE = $(prefix)/include/python$(PYTHON_VERSION)
# module name
MODULE = summon_core.so
# options for compiling and linking
LDFLAGS := $(LDFLAGS) -lglut -lGL -lSDL -lutil -lpython$(PYTHON_VERSION) -pthread
CFLAGS := $(CFLAGS) -I$(PYTHON_INCLUDE) -fno-strict-aliasing -fPIC
# programs
CC = g++
AR = ar
MAKE = make
RM = rm -rf
CP = cp -r
export MODULE CFLAGS LDFLAGS CC AR MAKE RM CP
#=============================================================================
# main target
all: lib/$(MODULE)
# include basic rules
SRCPREFIX=.
include Makefile.in
# top-level rules
lib/$(MODULE): src/Summon/$(MODULE)
$(CP) src/Summon/$(MODULE) lib
clean: cleanall
$(RM) lib/$(MODULE)
install: lib/$(MODULE)
$(CP) lib/* $(PYTHON_PREFIX)