1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
# Makefile --
# Created: Mon Jan 8 11:38:13 1996 by faith@acm.org
# Revised: Fri Dec 26 21:38:10 1997 by faith@acm.org
# Copyright 1996, 1997 Rickard E. Faith (faith@acm.org)
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Id: Makefile,v 1.15 1998/11/08 20:40:46 apenwarr Exp $
#
VERSION=3.0beta4
ifneq (,)
This makefile requires GNU Make.
endif
.SUFFIXES:
OBJS=apmlib.o
EXES=apm apmd tailf xapm
HEADERS=apm.h
CC=gcc
CFLAGS=-O -g
XTRACFLAGS=-Wall -pipe -I. -DVERSION=\"$(VERSION)\"
LDFLAGS=
XTRALDFLAGS=-L. -lapm
XLDFLAGS=-L/usr/X11R6/lib
XLIBS=-lXaw -lXmu -lXt -lXext -lSM -lICE -lX11
LIB=libapm.a
RANLIB=ranlib
# Uncomment these lines for a production compile
#CFLAGS=-O3 -m486 -fomit-frame-pointer
#LDFLAGS=-s
all: $(EXES)
$(OBJS): $(HEADERS)
%.o: %.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(XTRACFLAGS) $<
%: %.o $(LIB)
$(CC) -o $@ $< $(LDFLAGS) $(XTRALDFLAGS)
tailf: tailf.o
$(CC) -o $@ $< $(LDFLAGS) $(XTRALDFLAGS)
xapm.o: xapm.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(XTRACFLAGS) -DNARROWPROTO $<
xapm: xapm.o $(LIB)
$(CC) -o $@ $< $(LDFLAGS) $(XTRALDFLAGS) $(XLDFLAGS) $(XLIBS)
libapm.a: $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
$(RANLIB) $@
.PHONY: ChangeLog
ChangeLog:
-rm -f ChangeLog
rcs2log > ChangeLog
install: $(EXES)
install apm /usr/bin
install -m 644 apm.1 /usr/man/man1
install apmd /usr/sbin
install -m 644 apmd.8 /usr/man/man8
install xapm /usr/X11R6/bin
install -m 644 xapm.1 /usr/X11R6/man/man1/xapm.1x
install tailf /usr/bin
install -m 644 tailf.1 /usr/man/man1
install -m 644 libapm.a /usr/lib
install -m 644 apm.h /usr/include
.PHONY: clean distclean
distclean clean:
-rm -f *.o *.s *~ core a.out build-stamp $(LIB) $(EXES)
dist:
(rm -f /tmp/ChangeLog ./ChangeLog; \
rcs2log > /tmp/ChangeLog; \
cd /tmp; \
rm -rf /tmp/apmd-$(VERSION); \
cvs export -fNd apmd-$(VERSION) -r HEAD apmd; \
cd apmd-$(VERSION); \
mv ../ChangeLog .; \
find -type d | xargs chmod 755; \
find -type f | xargs chmod 644; \
find -type d | xargs chown root:root; \
find -type f | xargs chown root:root; \
cd ..; \
tar cvvf apmd-$(VERSION).tar apmd-$(VERSION); \
gzip -9f apmd-$(VERSION).tar; \
cp -p apmd-$(VERSION)/LSM apmd-$(VERSION).lsm; \
cp -p apmd-$(VERSION)/ANNOUNCE apmd-$(VERSION).Announce; \
echo Done.)
|