File: example_common.mak

package info (click to toggle)
pycxx 5.3.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 460 kB
  • ctags: 1,131
  • sloc: cpp: 2,148; makefile: 82; python: 68; sh: 9; ansic: 8
file content (40 lines) | stat: -rw-r--r-- 849 bytes parent folder | download
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
#
#	example_common.mak
#
#	include this mak file after defining the variables it needs
#

OBJECTS=example.o range.o rangetest.o cxxsupport.o cxx_extensions.o cxxextensions.o IndirectPythonInterface.o

all: example.so

example.so: $(OBJECTS)
	$(LDSHARED) -o $@ $(OBJECTS) $(LDLIBS)

example.o: Demo/example.cxx
	$(CCC) $(CCCFLAGS) -o $@ $<

range.o: Demo/range.cxx
	$(CCC) $(CCCFLAGS) -o $@ $<

rangetest.o: Demo/rangetest.cxx
	$(CCC) $(CCCFLAGS) -o $@ $<

cxxsupport.o: Src/cxxsupport.cxx
	$(CCC) $(CCCFLAGS) -o $@ $<

cxx_extensions.o: Src/cxx_extensions.cxx
	$(CCC) $(CCCFLAGS) -o $@ $<

cxxextensions.o: Src/cxxextensions.c
	$(CC) -c $(CCCFLAGS) -o $@ $<

IndirectPythonInterface.o: Src/IndirectPythonInterface.cxx
	$(CCC) $(CCCFLAGS) -o $@ $< 

clean:
	rm -f *.o
	rm -f example.so

test: example.so
	$(PYTHON) -c "import example;example.test()"