diff options
author | Cameron Katri <me@cameronkatri.com> | 2021-05-02 16:00:07 -0400 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2021-05-02 16:00:07 -0400 |
commit | f3dab068fce37270e5e4e1a00e5a44e30f00baf7 (patch) | |
tree | d6b8c70074d440e56c1d7cdbfc7b68d8b96bda96 /chpass/Makefile | |
parent | 6b46c62f4663c84790120a4e74e155a6ef16b41c (diff) | |
download | pw-darwin-f3dab068fce37270e5e4e1a00e5a44e30f00baf7.tar.gz pw-darwin-f3dab068fce37270e5e4e1a00e5a44e30f00baf7.tar.zst pw-darwin-f3dab068fce37270e5e4e1a00e5a44e30f00baf7.zip |
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])
Diffstat (limited to 'chpass/Makefile')
-rw-r--r-- | chpass/Makefile | 87 |
1 files changed, 42 insertions, 45 deletions
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 <src.opts.mk> - -.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 <bsd.prog.mk> +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 |