From: Francois Fleuret Date: Wed, 14 Jun 2017 21:06:47 +0000 (+0200) Subject: Simplified naming and compilation. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=924ef5308c54784d2c0a9bbd282e55a16efbf318;p=flatland.git Simplified naming and compilation. --- diff --git a/Makefile b/Makefile index 1bdce0a..166d6ff 100644 --- a/Makefile +++ b/Makefile @@ -30,11 +30,14 @@ CXXFLAGS += -I/usr/include/cairo -DCAIRO_SUPPORT 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 \ @@ -45,6 +48,6 @@ Makefile.depend: *.h *.cc Makefile $(CC) $(CXXFLAGS) -M *.cc > Makefile.depend clean: - \rm -f flatland *.o *.so Makefile.depend + \rm -rf flatland *.o *.so Makefile.depend -include Makefile.depend diff --git a/README.md b/README.md index 1bf3e1f..9e8e3b3 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,5 @@ small images), the simulation may be stuck. ``` make -j -k -./build.py ./flatland-test.py ``` diff --git a/build.py b/build.py index 7df40c0..3078209 100755 --- a/build.py +++ b/build.py @@ -27,7 +27,7 @@ from torch.utils.ffi import create_extension 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' ], diff --git a/flatland-test.py b/flatland-test.py index 8d9f11b..2c269ba 100755 --- a/flatland-test.py +++ b/flatland-test.py @@ -25,7 +25,7 @@ import torch import torchvision import argparse -from _ext import flatland +import flatland ######################################################################