1 diff -druN src/makefile src/makefile
2 --- src/makefile 2013-02-14 18:26:28.000000000 +0100
3 +++ src/makefile 2013-02-15 14:34:54.082756900 +0100
5 gflags = -c $(includedirs) -g
7 cflags = $(gflags) # the default setting
8 +cflags = -c $(includedirs) $(CPPFLAGS) $(CXXFLAGS) -fPIC
19 +ifeq ($(UNAME),Darwin)
24 + LINKFLAGS = -dynamiclib -Wl,-headerpad_max_install_names,-undefined,dynamic_lookup,-compatibility_version,3.0,-current_version,3.0,-install_name,$(SAGE_LOCAL)/lib/$(LIBPREFIX)$(LIBNAME)$(LIBEXT)
27 +ifeq ($(UNAME),CYGWIN)
32 + IMPLIB = lib$(LIBNAME).dll.a
33 + LINKFLAGS = -shared -Wl,--out-implib=$(IMPLIB) -Wl,--export-all-symbols
40 + LINKFLAGS = $(LDFLAGS) -shared -Wl,-soname,libcoxeter3.so
44 +LIBRARY = $(LIBPREFIX)$(LIBNAME)$(LIBEXT)
47 +all: coxeter executable
50 - $(cc) -o coxeter $(objects)
51 + $(CXX) $(LINKFLAGS) -o $(LIBRARY) $(objects) $(LINKLIBS)
53 +executable: $(objects)
54 + $(CXX) $(LDFLAGS) -o $(EXENAME)$(EXEEXT) $(objects)
56 +DATADIR="$$SAGE_LOCAL/share/coxeter/"
57 +INCLUDEDIR="$$SAGE_LOCAL/include/coxeter/"
58 +LIBRARYDIR="$$SAGE_LOCAL/$(LIBDIR)"
60 +install: coxeter executable
61 + cp $(EXENAME)$(EXEEXT) "$$SAGE_LOCAL/bin/"
62 + cp $(LIBRARY) $(LIBRARYDIR)
63 + if [ $(UNAME) = "CYGWIN" ]; then \
64 + cp $(IMPLIB) "$$SAGE_LOCAL/lib/"; \
68 + cp -r coxeter_matrices headers messages $(DATADIR)
69 + mkdir -p $(INCLUDEDIR)
70 + cp -r *.h *.hpp $(INCLUDEDIR)
72 +check: coxeter executable
73 + $(EXENAME)$(EXEEXT) < test.input > test.output
75 + if ! diff test.output.expected test.output > /dev/null; then \
76 + echo >&2 "Error testing coxeter on test.input:"; \
77 + diff test.output.expected test.output; \
86 - $(cc) $(cflags) $*.cpp
87 + $(CXX) $(cflags) $*.cpp
89 # dependencies --- these were generated automatically by make depend on my
90 # system; they are explicitly copied for portability. Only local dependencies
92 # contents of tmp in lieu of the dependencies listed here.
97 depend: $(dependencies)
99 affine.o: affine.cpp affine.h globals.h coxgroup.h coxtypes.h io.h list.h \