diff options
author | Cameron Katri <me@cameronkatri.com> | 2021-02-14 00:54:48 -0500 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2021-02-14 00:54:48 -0500 |
commit | 1ad0e39ee51181ea6c13b3d1d4e9c6005ee35b5e (patch) | |
tree | 3e8caeeb3c85b9cadcc14bfc2fdd8a247c3dbd44 /Makefile | |
parent | 737fa5a9bfd3fd968b92fe94936c524ae3685cf3 (diff) | |
download | getent-darwin-main.tar.gz getent-darwin-main.tar.zst getent-darwin-main.zip |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9a7548e --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +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 +GINSTALL ?= install +PREFIX ?= /usr +DESTDIR ?= + +SRC := getent.c getutxent.c + +all: getent + +install: install-getent + +copy-headers: + cp -af $(MACOSX_SYSROOT)/usr/include/netinet include/ + cp -af $(MACOSX_SYSROOT)/usr/include/net include/ + +getent: $(SRC) ent.xml copy-headers + $(CC) $(CFLAGS) -o getent -Iinclude $(SRC) + $(STRIP) getent + $(LDID) -Sent.xml getent + +install-getent: getent getent.1 + $(GINSTALL) -Dm755 getent $(DESTDIR)/$(PREFIX)/bin/getent + $(GINSTALL) -Dm644 getent.1 $(DESTDIR)/$(PREFIX)/share/man/man1/getent.1 + +clean: + rm -f getent + +.PHONY: all install install-getent clean copy-headers |