91 lines
1.7 KiB
Makefile
91 lines
1.7 KiB
Makefile
PREFIX = $$HOME/.local
|
|
BINDIR = $(PREFIX)/bin
|
|
DATADIR = $(PREFIX)/share
|
|
|
|
ELK_INCLUDE_DIR = $(PREFIX)/include
|
|
ELK_LIB_DIR = $(PREFIX)/lib
|
|
|
|
CTAGS = ctags -t -w
|
|
INSTALL = install
|
|
MAKEDEPEND = makedepend
|
|
|
|
CC = gcc
|
|
CFLAGS = -Wall -pedantic -O -I $(ELK_INCLUDE_DIR)
|
|
LDFLAGS = -L $(ELK_LIB_DIR) -lm -lelk
|
|
|
|
### The directory under which you will install the Scheme files.
|
|
DEFAULT_DIR = $(DATADIR)/unroff
|
|
SCMDIR = $(DATADIR)/unroff/scm
|
|
|
|
DEFAULT_FORMAT = html
|
|
|
|
INCLUDE = -I $(ELK_INCLUDE_DIR)
|
|
DEFS = -D DEFAULT_DIR=\"$(DEFAULT_DIR)\" -D DEFAULT_FORMAT=\"$(DEFAULT_FORMAT)\"
|
|
|
|
SOURCES = \
|
|
args.c\
|
|
buffer.c\
|
|
error.c\
|
|
event.c\
|
|
expr.c\
|
|
gcroot.c\
|
|
insert.c\
|
|
malloc.c\
|
|
parse.c\
|
|
prim.c\
|
|
scmtable.c\
|
|
stream.c\
|
|
subst.c\
|
|
table.c\
|
|
unroff.c
|
|
|
|
OBJECTS = \
|
|
args.o\
|
|
buffer.o\
|
|
error.o\
|
|
event.o\
|
|
expr.o\
|
|
gcroot.o\
|
|
insert.o\
|
|
malloc.o\
|
|
parse.o\
|
|
prim.o\
|
|
scmtable.o\
|
|
stream.o\
|
|
subst.o\
|
|
table.o\
|
|
unroff.o
|
|
|
|
all: unroff
|
|
|
|
unroff: $(OBJECTS)
|
|
$(CC) $(LDFLAGS) -o $@ $(OBJECTS)
|
|
|
|
.c.o:
|
|
$(CC) $(CFLAGS) $(INCLUDE) $(DEFS) -c $<
|
|
|
|
install: unroff
|
|
$(INSTALL) unroff $(BINDIR)/unroff
|
|
mkdir -p $(SCMDIR)
|
|
mkdir -p $(SCMDIR)/html
|
|
mkdir -p $(SCMDIR)/misc
|
|
$(INSTALL) -m 644 ../scm/html/common.scm $(SCMDIR)/html/common.scm
|
|
$(INSTALL) -m 644 ../scm/html/m.scm $(SCMDIR)/html/m.scm
|
|
$(INSTALL) -m 644 ../scm/html/man.scm $(SCMDIR)/html/man.scm
|
|
$(INSTALL) -m 644 ../scm/html/ms.scm $(SCMDIR)/html/ms.scm
|
|
$(INSTALL) -m 644 ../scm/misc/hyper.scm $(SCMDIR)/misc/hyper.scm
|
|
$(INSTALL) -m 644 ../scm/troff.scm $(SCMDIR)/troff.scm
|
|
|
|
clean:
|
|
rm -f $(OBJECTS) unroff
|
|
|
|
tags ctags: $(SOURCES)
|
|
$(CTAGS) $(SOURCES)
|
|
|
|
depend: Makefile $(SOURCES)
|
|
$(MAKEDEPEND) $(INCLUDE) $(SOURCES)
|
|
|
|
.PHONY: all clean ctags depend install tags
|
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|