--- Makefile.orig 1998-06-18 10:44:09 UTC +++ Makefile @@ -1,17 +1,18 @@ OBJ = libapm.o bios.o smi.o PROGRAM = libapm -OWNER = -g root -GROUP = -o root -MODE = -m 755 -#MODE = -m 4755 -BINDIR = /usr/local/bin -MANSECT = l -MANDIR = /usr/local/man/ja_JP.ujis -MANLANG = j -#MANDIR = /usr/local/man -#MANLANG = e +PROGRAM_NAME = libretto-config +#OWNER = -o root +#GROUP = -g operator +#MODE = -m 4550 +BINDIR = ${PREFIX}/sbin +MANSECT = 8 +MANDIR = ${PREFIX}/man +MANLANG = e -CFLAGS = -O2 #-DLIBRETTO -DDEBUG +#DEFS= -DLIBRETTO -DDEBUG +CFLAGS += $(DEFS) + +all: $(PROGRAM) $(PROGRAM): $(OBJ) $(CC) $(CFLAGS) -o $(PROGRAM) $(OBJ) @@ -19,12 +20,12 @@ $(PROGRAM): $(OBJ) clean: /bin/rm -f $(OBJ) $(PROGRAM) *~ -install: install.bin +install: install.bin install.man install.bin: - install -c -s $(OWNER) $(GROUP) $(MODE) $(PROGRAM) $(BINDIR) + install -c -s $(OWNER) $(GROUP) $(MODE) $(PROGRAM) $(DESTDIR)$(BINDIR)/$(PROGRAM_NAME) install.man: - - mkdir $(MANDIR)/man$(MANSECT) - install -c -m 644 libapm-${MANLANG}.man $(MANDIR)/man$(MANSECT)/libapm.$(MANSECT) - + ${BSD_INSTALL_MAN} libapm-${MANLANG}.man $(DESTDIR)$(MANDIR)/man$(MANSECT)/$(PROGRAM_NAME).$(MANSECT) + +libapm.o: libapm.h libapm.c