1 # Makefile for RIGHT ON COMMAND-LINE
3 #----- Configuration stuff --------------------------------------------------
5 # --- Compiling and linking ---
9 CFLAGS
= -O2
-g
-pedantic
-Wall
$(INCLUDES
)
13 # --- Installation ---
17 tcllibdir
= $(prefix)/lib
18 pkglibdir
= $(tcllibdir
)/elite
19 bindir = $(prefix)/bin
24 #----- Main machinery -------------------------------------------------------
26 # Shouldn't need to fiddle with thiis stuff.
32 elite-editor elite-pairs elite-path elite-find elite-map \
33 elite-prices elite-describe elite-reach
35 all: elite.so pkgIndex.tcl
38 $(LD
) $(LDFLAGS
) elite.o
-o elite.so
41 .c.o
:; $(CC
) -c
$(CFLAGS
) -o
$@
$<
43 pkgIndex.tcl
: elite.so elite.tcl
44 echo
"pkg_mkIndex -verbose -direct . elite.so elite.tcl" | tclsh
47 $(INSTALL
) -d
$(INST
)$(bindir) $(INST
)$(pkglibdir
)
48 $(INSTALL
) -m
644 elite.so elite.tcl pkgIndex.tcl
$(INST
)$(pkglibdir
)
49 $(INSTALL
) -m
755 $(TCLSCRIPTS
) $(INST
)$(bindir)
52 $(RM
) -f elite.o elite.so pkgIndex.tcl
54 DISTDIR
= $(PACKAGE
)-$(VERSION
)
55 DISTFILES
= README Makefile elite.c elite.def
$(TCLSCRIPTS
)
59 for i in
$(DISTFILES
); do ln
-s ..
/$$i $(DISTDIR
); done
61 tar chofz
$(DISTDIR
).
tar.gz
$(DISTDIR
)
64 .PHONY
: all install clean dist distdir
66 #----- That's all, folks ----------------------------------------------------