Makefile 479 B

1234567891011121314151617181920212223242526
  1. CC = gcc -Wall
  2. stations.so: stationsmodule.c stations.dat.h stations-code.h
  3. $(CC) -shared -fPIC -I/usr/local/include/python2.5 \
  4. -o stations.so stationsmodule.c
  5. stations.dat.h: stations.dat
  6. sed <$< >$@ -e 's:\([^,]*\),\([^,]*\): { "\1", "\2" },:'
  7. stations-code.h: stations.dat stations-tmpl.h
  8. ../perfect_hash.py --trails 2 $^
  9. clean:
  10. rm stations-code.h stations.dat.h stations.so
  11. test:
  12. python -c "import stations; print stations.locator('DL5BAC')"