1 CC ?= aarch64-apple-darwin-clang
2 STRIP ?= aarch64-apple-darwin-strip
4 CFLAGS ?= -arch arm64 -isysroot /home/cameron/Documents/SDK/iPhoneOS14.3.sdk -miphoneos-version-min=13.0
26 LIBUTILSRC := ../libutil/login_cap.c \
27 ../libutil/pw_util.c \
28 ../libutil/gr_util.c \
30 ../libutil/login_crypt.c \
31 ../libutil/_secure_path.c
33 LIBCSRC := ../libc/stdlib/strtonum.c \
40 pw: $(SRC:%.c=%.o) $(LIBCSRC:%.c=%.o) $(LIBUTILSRC:%.c=%.o) ../ent.xml
41 $(CC) $(LDFLAGS) -o $@ -lcrypt $(SRC:%.c=%.o) $(LIBCSRC:%.c=%.o) $(LIBUTILSRC:%.c=%.o)
43 $(LDID) -S../ent.xml $@
46 $(CC) $(CFLAGS) -c -o $@ $< -I. -I../libutil -I../libc/gen
48 install-pw: pw pw.8 pw.conf.5
49 $(GINSTALL) -Dm755 pw $(DESTDIR)/$(PREFIX)/sbin/pw
50 $(GINSTALL) -Dm644 pw.8 $(DESTDIR)/$(PREFIX)/share/man/man8/pw.8
51 $(GINSTALL) -Dm644 pw.conf.5 $(DESTDIR)/$(PREFIX)/share/man/man5/pw.conf.5
52 mkdir -p $(DESTDIR)/$(PREFIX)/share/skel
55 rm -f pw $(SRC:%.c=%.o) $(LIBCSRC:%.c=%.o) $(LIBUTILSRC:%.c=%.o)
57 .PHONY: all install install-pw clean