File: Makefile

package info (click to toggle)
pyepl 1.1.0-3.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,120 kB
  • sloc: cpp: 7,986; python: 6,026; makefile: 360; ansic: 132
file content (38 lines) | stat: -rw-r--r-- 1,214 bytes parent folder | download | duplicates (3)
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
# PyEPL: hardware/rt/Makefile
#
# Copyright (C) 2003-2005 Michael J. Kahana
# Authors: Ian Schleifer, Per Sederberg, Aaron Geller, Josh Jacobs
# URL: http://memory.psych.upenn.edu/programming/pyepl
#
# Distributed under the terms of the GNU Lesser General Public License
# (LGPL). See the license.txt that came with this file.


PLATFORM = $(shell uname | sed s/GNU\\/kFreeBSD/Linux/)

INCLUDEPY=$(shell python -c "import distutils.sysconfig;print distutils.sysconfig.get_config_var('INCLUDEPY')")
LIBPY=$(shell python -c "import distutils.sysconfig;print distutils.sysconfig.get_config_var('LIBPL')")

ifeq ($(PLATFORM), Linux)

all: 
# Do nothing for now

clean:
	rm -f *.so *.o

endif

ifeq ($(PLATFORM), Darwin)
all: _realtime.so

_realtime.so: realtime.o realtime.i 
	swig -c++ -python realtime.i
	g++ -c  -Wno-long-double realtime_wrap.cxx -DHAVE_CONFIG_H -I$(INCLUDEPY)
	g++ -bundle -undefined suppress -flat_namespace realtime.o realtime_wrap.o -o _realtime.so -lpthread

realtime.o: realtime.cpp
	g++ -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -D__MACOSX_CORE__ -I$(INCLUDEPY) -c realtime.cpp -o realtime.o


endif