chiark / gitweb /
clean up cores
[moebius2.git] / Makefile
index cf0bbd08caf158a7b6a07ac262cf90c23e213f93..f4c0ebc875e28a7d6294b4091201d7d492391745 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,12 @@
 
-TARGETS= minimise primer initial project
+TARGETS= minimise primer initial view
 
-CWARNS=        -Wall -Wwrite-strings -Wpointer-arith -Werror
+CWARNS=        -Wall -Wwrite-strings -Wpointer-arith -Werror -Wshadow
+CXXWARNS= $(CWARNS) -Wno-shadow -Wno-error
 
 OPTIMISE=      -O2
-CFLAGS=                $(CWARNS) $(OPTIMISE) -g
-CXXFLAGS=      $(CWARNS) $(OPTIMISE) -g
+CFLAGS=                -MMD $(OPTIMISE) -g $(CWARNS)
+CXXFLAGS=      -MMD $(OPTIMISE) -g $(CXXWARNS)
 
 LIBGSL= -lgsl -lgslcblas
 
@@ -17,14 +18,18 @@ minimise:   energy.o bgl.o common.o mgraph.o
 primer:                primer.o common.o
                $(CC) $(CFLAGS) -o $@ $^ $(LIBGSL)
 
-project:       project.o common.o mgraph.o
+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 *.o $(TARGETS) *.new *.tmp *.rej *.orig core vgcore.*
+               rm -f initial
+               rm -f *.d
 
-%.o::          common.h mgraph.h bgl.h
+realclean:     clean
+               rm -f best
+
+-include *.d