LDFLAGS += -lcairo
-all: flatland_generator.so TAGS
+all: flatland TAGS
TAGS: *.cc *.h
etags *.cc *.h
+flatland: flatland_generator.so
+ ./build.py
+
flatland_generator.so: \
sequence_generator.o misc.o \
polygon.o universe.o \
$(CC) $(CXXFLAGS) -M *.cc > Makefile.depend
clean:
- \rm -f flatland *.o *.so Makefile.depend
+ \rm -rf flatland *.o *.so Makefile.depend
-include Makefile.depend
```
make -j -k
-./build.py
./flatland-test.py
```
abs_path = os.path.dirname(os.path.abspath(__file__))
ffi = create_extension(
- '_ext.flatland',
+ 'flatland',
headers = [ 'flatland.h' ],
sources = [ 'flatland.c' ],
extra_objects = [ abs_path + '/flatland_generator.so' ],
import torchvision
import argparse
-from _ext import flatland
+import flatland
######################################################################