Annotation of embedaddon/libpdel/GNUmakefile.in, revision 1.1
1.1 ! misho 1: # $Id: GNUmakefile.in,v 1.12 2004/12/13 16:42:20 archie Exp $
! 2:
! 3: #
! 4: # Variables. Edit to suit.
! 5: #
! 6: srcdir = .
! 7: top_srcdir = .
! 8: prefix = /usr/local
! 9: exec_prefix = ${prefix}
! 10: libdir = ${exec_prefix}/lib
! 11: mandir = ${prefix}/man
! 12: includedir = ${prefix}/include/pdel
! 13:
! 14: ar = /usr/bin/ar
! 15: ranlib = ranlib
! 16: install = /usr/bin/install
! 17:
! 18: libown = root
! 19: libgroup = 0
! 20:
! 21: manown = root
! 22: mangroup = 0
! 23:
! 24: includeown = root
! 25: includegroup = 0
! 26:
! 27: DESTDIR =
! 28:
! 29: #
! 30: # Below here should not need to be edited
! 31: #
! 32:
! 33: SRCS= @SRCS@
! 34: SRCDIRS= @SRCDIRS@
! 35: INCS= @INCS@
! 36: MAN= @MAN@
! 37: MLINKS= @MLINKS@
! 38: CFLAGS= @CFLAGS@
! 39: SUBDIRS= @SUBDIRS@
! 40: VERSION_MAJOR= @VERSION_MAJOR@
! 41: VERSION_MINOR= @VERSION_MINOR@
! 42: VERSION_PATCH= @VERSION_PATCH@
! 43:
! 44: OS= $(shell uname -s)
! 45:
! 46: EXTRAINCS= -I$(srcdir)/ports/$(OS) -I$(prefix)/ssl/include -I/usr/kerberos/include
! 47:
! 48: VPATH= $(SRCDIRS)
! 49:
! 50: objs= $(SRCS:.c=.o)
! 51: cman= $(foreach m,$(MAN),$(m).gz)
! 52: cc= gcc
! 53:
! 54: library= libpdel.a
! 55:
! 56: all: $(library) $(cman)
! 57:
! 58: %.gz: %
! 59: gzip < $+ > $@
! 60:
! 61: %.o: %.c
! 62: $(cc) -c -o $@ $(CFLAGS) -include $(srcdir)/ports/$(OS)/hacks.h -I$(srcdir) $(EXTRAINCS) $+
! 63:
! 64: $(library): $(objs)
! 65: $(ar) rv $@ $(objs)
! 66: $(ranlib) $@
! 67:
! 68: clean:
! 69: rm -f $(objs) $(library) $(cman)
! 70:
! 71: install: install-library install-header-dirs install-headers install-man
! 72:
! 73: uninstall: uninstall-library uninstall-headers uninstall-man
! 74:
! 75: install-library: $(library)
! 76: $(install) -c -o $(libown) -g $(libgroup) -m 444 \
! 77: $(library) $(DESTDIR)$(libdir)/$(library)
! 78:
! 79: uninstall-library:
! 80: rm -f $(DESTDIR)$(libdir)/$(library)
! 81:
! 82: install-header-dirs:
! 83: @incdirs=`echo $(INCS) | awk '{for(i=1;i<=NF;i++)print $$i}' \
! 84: | grep / | sed 's,^\(.*\)/[^/][^/]*$$,\1,g' | sort -u`; \
! 85: for dir in $$incdirs; do \
! 86: if ! [ -d $(DESTDIR)$(includedir)$$dir ]; then \
! 87: echo $(install) -d -o $(includeown) -g $(includegroup) \
! 88: -m 0755 $(DESTDIR)$(includedir)/$$dir; \
! 89: $(install) -d -o $(includeown) -g $(includegroup) \
! 90: -m 0755 $(DESTDIR)$(includedir)/$$dir; \
! 91: fi; \
! 92: done
! 93:
! 94: install-headers:
! 95: @for hdr in $(INCS); do \
! 96: echo $(install) -c -o $(includeown) -g $(includegroup) -m 444 \
! 97: $$hdr $(DESTDIR)$(includedir)/$$hdr; \
! 98: $(install) -c -o $(includeown) -g $(includegroup) -m 444 \
! 99: $$hdr $(DESTDIR)$(includedir)/$$hdr; \
! 100: done
! 101:
! 102: uninstall-headers:
! 103: @for hdr in $(INCS); do \
! 104: echo rm -f $(DESTDIR)$(includedir)/$$hdr; \
! 105: rm -f $(DESTDIR)$(includedir)/$$hdr; \
! 106: done
! 107:
! 108: install-man: install-manpages install-manlinks
! 109:
! 110: uninstall-man: uninstall-manpages uninstall-manlinks
! 111:
! 112: install-manpages: $(cman)
! 113: @for p in $(MAN); do \
! 114: section=`echo $$p | sed 's/^[^.]*.//g'`; \
! 115: f=`basename $$p`; \
! 116: if [ ! -d $(DESTDIR)$(mandir)/man$$section ]; then \
! 117: echo $(install) -d -o $(manown) -g $(mangroup) -m 755 \
! 118: $(DESTDIR)$(mandir)/man$$section; \
! 119: $(install) -d -o $(manown) -g $(mangroup) -m 755 \
! 120: $(DESTDIR)$(mandir)/man$$section; \
! 121: fi; \
! 122: echo $(install) -c -o $(manown) -g $(mangroup) -m 444 \
! 123: $$p.gz $(DESTDIR)$(mandir)/man$$section/$$f.gz; \
! 124: $(install) -c -o $(manown) -g $(mangroup) -m 444 \
! 125: $$p.gz $(DESTDIR)$(mandir)/man$$section/$$f.gz; \
! 126: done
! 127:
! 128: uninstall-manpages:
! 129: @for p in $(MAN); do \
! 130: section=`echo $$p | sed 's/^[^.]*.//g'`; \
! 131: f=`basename $$p`; \
! 132: echo rm -f $(DESTDIR)$(mandir)/man$$section/$$f.gz; \
! 133: rm -f $(DESTDIR)$(mandir)/man$$section/$$f.gz; \
! 134: done
! 135:
! 136: install-manlinks:
! 137: @set `echo $(MLINKS) " " | sed 's/\.\([^.]*\) /.\1 \1 /g'`; \
! 138: while : ; do \
! 139: case $$# in \
! 140: 0) break;; \
! 141: [123]) echo "warn: empty MLINK: $$1 $$2 $$3"; break;; \
! 142: esac; \
! 143: name=$$1; shift; sect=$$1; shift; \
! 144: l=$(DESTDIR)$(mandir)/man$$sect/$$name; \
! 145: name=$$1; shift; sect=$$1; shift; \
! 146: t=$(DESTDIR)$(mandir)/man$$sect/$$name; \
! 147: echo $$t.gz -\> $$l.gz; \
! 148: rm -f $$t $$t.gz; \
! 149: ln $$l.gz $$t.gz; \
! 150: done
! 151:
! 152: uninstall-manlinks:
! 153: @set `echo $(MLINKS) " " | sed 's/\.\([^.]*\) /.\1 \1 /g'`; \
! 154: while : ; do \
! 155: case $$# in \
! 156: 0) break;; \
! 157: [123]) echo "warn: empty MLINK: $$1 $$2 $$3"; break;; \
! 158: esac; \
! 159: name=$$1; shift; sect=$$1; shift; \
! 160: l=$(DESTDIR)$(mandir)/man$$sect/$$name; \
! 161: name=$$1; shift; sect=$$1; shift; \
! 162: t=$(DESTDIR)$(mandir)/man$$sect/$$name; \
! 163: echo rm -f $$t.gz; \
! 164: rm -f $$t.gz; \
! 165: done
! 166:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>