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 (131 lines) | stat: -rw-r--r-- 3,069 bytes parent folder | download | duplicates (4)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# PyEPL: hardware/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.


all: eeg sound vr rt eventpoll.so timing.so keyboard.so joystick.so mouse.so

eeg: FORCE
	$(MAKE) -C eeg

sound: FORCE
	$(MAKE) -C sound

vr: FORCE
	$(MAKE) -C vr

rt: FORCE
	$(MAKE) -C rt

clean:
	rm -f *.o *.so
	for d in eeg sound vr rt; do $(MAKE) -C $$d clean; done
# very cruel I know
	for f in `find -iname \*.pyx`; do rm -f "$${f//.pyx/.c}"; done
	for f in `find -iname \*.i`; do rm -f "$${f//.i/.py}"; done
FORCE:

PLATFORM = $(shell uname)

ifeq ($(PLATFORM), Linux)

eventpoll.so: eventpoll.o
	gcc -shared eventpoll.o -o eventpoll.so

eventpoll.o: eventpoll.c
	gcc -c -fPIC -I/usr/include/python2.3/ eventpoll.c

eventpoll.c: eventpoll.pyx
	pyrexc eventpoll.pyx

timing.so: timing.o
	gcc -shared timing.o -o timing.so

timing.o: timing.c
	gcc -c -fPIC -I/usr/include/python2.3/ timing.c

timing.c: timing.pyx
	pyrexc timing.pyx

keyboard.so: keyboard.o
	gcc -shared keyboard.o -o keyboard.so

keyboard.o: keyboard.c
	gcc -c -fPIC -I/usr/include/python2.3/ keyboard.c

keyboard.c: keyboard.pyx
	pyrexc keyboard.pyx

joystick.so: joystick.o
	gcc -shared joystick.o -o joystick.so

joystick.o: joystick.c
	gcc -c -fPIC -I/usr/include/python2.3/ joystick.c

joystick.c: joystick.pyx
	pyrexc joystick.pyx

mouse.so: mouse.o
	gcc -shared mouse.o -o mouse.so

mouse.o: mouse.c
	gcc -c -fPIC -I/usr/include/python2.3/ mouse.c

mouse.c: mouse.pyx
	pyrexc mouse.pyx

endif

ifeq ($(PLATFORM), Darwin)

eventpoll.so: eventpoll.o
	gcc -bundle -flat_namespace -undefined suppress eventpoll.o -o eventpoll.so

eventpoll.o: eventpoll.c
	gcc -fPIC -c eventpoll.c -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3//

eventpoll.c: eventpoll.pyx
	pyrexc eventpoll.pyx

timing.so: timing.o
	gcc -bundle -flat_namespace -undefined suppress timing.o -o timing.so

timing.o: timing.c
	gcc -fPIC -c timing.c -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3//

timing.c: timing.pyx
	pyrexc timing.pyx

keyboard.so: keyboard.o
	gcc -bundle -flat_namespace -undefined suppress keyboard.o -o keyboard.so

keyboard.o: keyboard.c
	gcc -fPIC -c keyboard.c -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3//

keyboard.c: keyboard.pyx
	pyrexc keyboard.pyx

joystick.so: joystick.o
	gcc -bundle -flat_namespace -undefined suppress joystick.o -o joystick.so

joystick.o: joystick.c
	gcc -fPIC -c joystick.c -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3//

joystick.c: joystick.pyx
	pyrexc joystick.pyx

mouse.so: mouse.o
	gcc -bundle -flat_namespace -undefined suppress mouse.o -o mouse.so

mouse.o: mouse.c
	gcc -fPIC -c mouse.c -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3//

mouse.c: mouse.pyx
	pyrexc mouse.pyx

endif