From f3dab068fce37270e5e4e1a00e5a44e30f00baf7 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Sun, 2 May 2021 16:00:07 -0400 Subject: Recommit everything, add chpass, improve history (except for a few files that git-filter-repo dislikes for some reason [_secure_path.c and login_cap.h]) --- chpass/Makefile | 87 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 42 insertions(+), 45 deletions(-) (limited to 'chpass/Makefile') diff --git a/chpass/Makefile b/chpass/Makefile index bd5baa3..1f88e51 100644 --- a/chpass/Makefile +++ b/chpass/Makefile @@ -1,45 +1,42 @@ -# @(#)Makefile 8.2 (Berkeley) 4/2/94 -# $FreeBSD$ - -.include - -.PATH: ${SRCTOP}/lib/libc/gen - -PROG= chpass -SRCS= chpass.c edit.c field.c pw_scan.c table.c util.c -BINOWN= root -BINMODE=4555 -PRECIOUSPROG= -.if ${MK_NIS} != "no" -CFLAGS+= -DYP -.endif -#Some people need this, uncomment to activate -#CFLAGS+=-DRESTRICT_FULLNAME_CHANGE -CFLAGS+=-I${SRCTOP}/lib/libc/gen -I. - -LIBADD= crypt util -.if ${MK_NIS} != "no" -LIBADD+= ypclnt -.endif - -SYMLINKS= chpass ${BINDIR}/chfn -SYMLINKS+= chpass ${BINDIR}/chsh -.if ${MK_NIS} != "no" -SYMLINKS+= chpass ${BINDIR}/ypchfn -SYMLINKS+= chpass ${BINDIR}/ypchpass -SYMLINKS+= chpass ${BINDIR}/ypchsh -.endif - -MLINKS= chpass.1 chfn.1 chpass.1 chsh.1 -.if ${MK_NIS} != "no" -MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1 -.endif - -beforeinstall: -.for i in chpass chfn chsh ypchpass ypchfn ypchsh -.if exists(${DESTDIR}${BINDIR}/$i) - -chflags noschg ${DESTDIR}${BINDIR}/$i -.endif -.endfor - -.include +CC ?= aarch64-apple-darwin-clang +STRIP ?= aarch64-apple-darwin-strip +LDID ?= ldid +CFLAGS ?= -arch arm64 -isysroot /home/cameron/Documents/SDK/iPhoneOS14.3.sdk -miphoneos-version-min=13.0 +LDFLAGS ?= +GINSTALL ?= install +PREFIX ?= /usr +DESTDIR ?= + +SRC := chpass.c \ + edit.c \ + field.c \ + table.c \ + util.c \ + ../libutil/pw_util.c \ + ../libutil/flopen.c \ + ../libc/gen/pw_scan.c + +all: chpass + +install: install-chpass + +chpass: $(SRC:%.c=%.o) ../ent.xml + $(CC) $(LDFLAGS) -o $@ -lcrypt $(SRC:%.c=%.o) + $(STRIP) $@ + $(LDID) -S../ent.xml $@ + +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< -I. -I../libutil -I../libc/gen + +install-chpass: chpass chpass.1 + $(GINSTALL) -Dm4555 chpass $(DESTDIR)/$(PREFIX)/bin/chpass + ln -sf chpass $(DESTDIR)/$(PREFIX)/bin/chfn + ln -sf chpass $(DESTDIR)/$(PREFIX)/bin/chsh + $(GINSTALL) -Dm644 chpass.1 $(DESTDIR)/$(PREFIX)/share/man/man1/chpass.1 + ln -sf chpass.1 $(DESTDIR)/$(PREFIX)/share/man/man1/chfn.1 + ln -sf chpass.1 $(DESTDIR)/$(PREFIX)/share/man/man1/chsh.1 + +clean: + rm -f chpass $(SRC:%.c=%.o) + +.PHONY: all install install-chpass clean -- cgit v1.2.3-56-ge451