chiark / gitweb /
view various dimensions
authorIan Jackson <ian@davenant.relativity.greenend.org.uk>
Wed, 16 Jan 2008 21:27:37 +0000 (21:27 +0000)
committerIan Jackson <ian@davenant.relativity.greenend.org.uk>
Wed, 16 Jan 2008 21:27:37 +0000 (21:27 +0000)
.bzrignore
Makefile

index 6c387ea..ac0ffb3 100644 (file)
@@ -1,6 +1,6 @@
 minimise
 primer
-view
+view+[1-9][1-9]
 *.d
 *.tmp
 *.new
index 9b8d469..8d3d188 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 
-TARGETS= minimise primer view lumpy.cfm sgtatham.cfm ring.cfm
+TARGETS= minimise primer view+33 view+44 lumpy.cfm sgtatham.cfm ring.cfm
 SGTATHAM=sgtatham
 
 CWARNS=        -Wall -Wwrite-strings -Wpointer-arith -Werror -Wshadow
@@ -24,8 +24,6 @@ primer:               primer.o common.o
 prime.data:    primer
                ./$^ $o
 
-view:          view.o common.o mgraph.o
-               $(CC) $(CFLAGS) -o $@ $^ $(LIBGSL) -L/usr/X11R6/lib -lX11
 
 sgtatham.cfm:  sgtatham-regenerator prime.data $(SGTATHAM)/z.typescript
                ./$^ -T -o$@
@@ -36,6 +34,21 @@ lumpy.cfm: oldmoebius-converter prime.data ../moebius/ins-new ../moebius/a.out
 ring.cfm: oldmoebius-converter prime.data /dev/null ../moebius/a.out
                ./$^ -o$@
 
+
+# this ridiculous repetition is due to make being too lame
+
+view+%:                view+%.o mgraph+%.o common.o
+               $(CC) $(CFLAGS) -o $@ $^ $(LIBGSL) -L/usr/X11R6/lib -lX11
+
+view+%.o:      view.c
+               $(CC) -c $(CPPFLAGS) $(CFLAGS) -DDEFBITS=$* $< -o $@
+
+mgraph+%.o:    mgraph.c
+               $(CC) -c $(CPPFLAGS) $(CFLAGS) -DDEFBITS=$* $< -o $@
+
+.PRECIOUS: view+%.o mgraph+%.o
+
+
 clean:
                rm -f prime.data $(TARGETS)
                rm -f *.o *.new *.tmp *.rej *.orig core vgcore.* *~