chiark / gitweb /
A multidimensional vector/matrix type which is updateable in place.
[rocl] / Makefile
... / ...
CommitLineData
1# Makefile for RIGHT ON COMMAND-LINE
2#
3# $Id: Makefile,v 1.6 2003/03/04 10:27:11 mdw Exp $
4
5#----- Configuration stuff --------------------------------------------------
6
7# --- Compiling and linking ---
8
9CC = gcc
10INCLUDES =
11CFLAGS = -O2 -g -pedantic -Wall $(INCLUDES)
12LD = gcc
13LDFLAGS = -shared
14
15# --- Installation ---
16
17INST =
18prefix = /usr/local
19tcllibdir = $(prefix)/lib
20pkglibdir = $(tcllibdir)/elite
21bindir = $(prefix)/bin
22
23INSTALL = install
24RM = rm
25
26#----- Main machinery -------------------------------------------------------
27#
28# Shouldn't need to fiddle with thiis stuff.
29
30PACKAGE = rocl
31VERSION = 1.0.3
32
33TCLSCRIPTS = \
34 elite-editor elite-pairs elite-path elite-find elite-map \
35 elite-prices elite-describe elite-reach elite-cmdr
36
37all: elite.so pkgIndex.tcl
38
39elite.so: elite.o
40 $(LD) $(LDFLAGS) elite.o -o elite.so
41
42.SUFFIXES: .c .o
43.c.o:; $(CC) -c $(CFLAGS) -o $@ $<
44
45pkgIndex.tcl: elite.so elite.tcl
46 echo "pkg_mkIndex -verbose -direct . elite.so elite.tcl" | tclsh
47
48install: all
49 $(INSTALL) -d $(INST)$(bindir) $(INST)$(pkglibdir)
50 $(INSTALL) -m 644 elite.so elite.tcl pkgIndex.tcl $(INST)$(pkglibdir)
51 $(INSTALL) -m 755 $(TCLSCRIPTS) $(INST)$(bindir)
52
53clean:
54 $(RM) -f elite.o elite.so pkgIndex.tcl
55
56DISTDIR = $(PACKAGE)-$(VERSION)
57DISTFILES = README Makefile elite.c elite.tcl elite.def $(TCLSCRIPTS)
58distdir: $(DISTFILES)
59 $(RM) -rf $(DISTDIR)
60 mkdir $(DISTDIR)
61 for i in $(DISTFILES); do ln -s ../$$i $(DISTDIR); done
62disttar: distdir
63 tar chofz $(DISTDIR).tar.gz $(DISTDIR)
64distzip: distdir
65 cd $(DISTDIR) && zip -rq ../$(DISTDIR).zip .
66dist: disttar distzip
67 $(RM) -rf $(DISTDIR)
68distcheck: dist
69 @echo "*** Packing..."
70 $(MAKE) dist
71 @echo "*** Unpacking..."
72 tar xfz $(DISTDIR).tar.gz
73 @echo "*** Test building..."
74 set -e; \
75 cd $(DISTDIR); \
76 $(MAKE) clean; \
77 $(MAKE); \
78 $(MAKE) install INST=inst; \
79 $(MAKE) dist
80 @echo "*** Tidying up..."
81 rm -rf $(DISTDIR)
82 @echo "*** All OK"
83
84.PHONY: all install clean dist disttar distzip distdir distcheck
85
86#----- That's all, folks ----------------------------------------------------