summaryrefslogtreecommitdiff
path: root/components/rtgui/utils/perfect_hash/example-PyModule/Makefile
blob: 662ff784420ee2e7072f98ddb1f8cf42465c3fca (plain)
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


CC = gcc -Wall


stations.so: stationsmodule.c stations.dat.h stations-code.h
	$(CC) -shared -fPIC -I/usr/local/include/python2.5 \
            -o stations.so stationsmodule.c


stations.dat.h: stations.dat
	sed <$< >$@ -e 's:\([^,]*\),\([^,]*\):  { "\1", "\2" },:'


stations-code.h: stations.dat stations-tmpl.h
	../perfect_hash.py --trails 2 $^


clean:
	rm stations-code.h stations.dat.h stations.so


test:
	python -c "import stations; print stations.locator('DL5BAC')"