chiark / gitweb /
allow turn off hidden line removal
[moebius2.git] / Makefile
index fc74681e0e4b665f103753745e045dc5df7cd339..bec227e7bc409c626b7e59e67c0e0543e81da43b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,12 @@
 
-TARGETS= minimise primer initial
+TARGETS= minimise primer initial view
 
-CWARNS=        -Wall -Wwrite-strings -Wpointer-arith -Werror
+CWARNS=        -Wall -Wwrite-strings -Wpointer-arith -Werror -Wshadow
+CXXWARNS= $(CWARNS) -Wno-shadow
 
 OPTIMISE=      -O2
-CFLAGS=                $(CWARNS) $(OPTIMISE) -g
-CXXFLAGS=      $(CWARNS) $(OPTIMISE) -g
+CFLAGS=                -MMD $(OPTIMISE) -g $(CWARNS)
+CXXFLAGS=      -MMD $(OPTIMISE) -g $(CXXWARNS)
 
 LIBGSL= -lgsl -lgslcblas
 
@@ -17,11 +18,18 @@ minimise:   energy.o bgl.o common.o mgraph.o
 primer:                primer.o common.o
                $(CC) $(CFLAGS) -o $@ $^ $(LIBGSL)
 
+view:          view.o common.o mgraph.o
+               $(CC) $(CFLAGS) -o $@ $^ $(LIBGSL) -L/usr/X11R6/lib -lX11
+
 initial:       generator primer sgtatham/z.typescript
                ./$^ -o$@
 
 clean:
                rm -f *.o $(TARGETS) *.new *.tmp
-               rm -f best initial
+               rm -f initial
+               rm -f *.d
+
+realclean:     clean
+               rm -f best
 
-%.o::          common.h mgraph.h bgl.h
+-include *.d