chiark / gitweb /
rename project to view; do not clean best
[moebius2.git] / Makefile
index 9e3aa83e3b8a14a5bb23fce18620b9f00a3cfebb..39d43e33335776d784072e59c2454239122e5099 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,34 @@
 
-TARGETS=minimise
+TARGETS= minimise primer initial view
 
-CFLAGS=        -Wall -Wwrite-strings -Wpointer-arith -Werror
+CWARNS=        -Wall -Wwrite-strings -Wpointer-arith -Werror
+
+OPTIMISE=      -O2
+CFLAGS=                $(CWARNS) -MMD $(OPTIMISE) -g
+CXXFLAGS=      $(CWARNS) -MMD $(OPTIMISE) -g
+
+LIBGSL= -lgsl -lgslcblas
 
 all:           $(TARGETS)
 
 minimise:      energy.o bgl.o common.o mgraph.o
+               $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBGSL)
+
+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
-               rm -f best initial
+               rm -f *.o $(TARGETS) *.new *.tmp
+               rm -f initial
+               rm -f *.d
+
+realclean:     clean
+               rm -f best
+
+-include *.d