15 ifneq "$(shell basename $(SRCROOT))" "dirhelper.tproj"
16 SRCDIR=$(SRCROOT)/dirhelper.tproj
20 OBJDIR=$(OBJROOT)/dirhelper.obj
22 CFLAGS = -g -mdynamic-no-pic -Os -Wall -Wextra -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror -D__MigTypeCheck=1 $(RC_CFLAGS) -I $(OBJDIR)
29 cc -c $(CFLAGS) -o $(OBJDIR)/dirhelperServer.o $(OBJDIR)/dirhelperServer.c
30 cc -c $(CFLAGS) -o $(OBJDIR)/dirhelperUser.o $(OBJDIR)/dirhelperUser.c
31 cc -c $(CFLAGS) -o $(OBJDIR)/dirhelper.o $(SRCDIR)/dirhelper.c
32 cc $(CFLAGS) $(LDFLAGS) -o $(SYMROOT)/dirhelper $(OBJDIR)/dirhelperServer.o $(OBJDIR)/dirhelperUser.o $(OBJDIR)/dirhelper.o
35 cc $(CFLAGS) $(LDFLAGS) -o $(SYMROOT)/client $(SRCDIR)/client.c $(OBJDIR)/dirhelperUser.c
38 install -m 0644 -o root -g wheel -d $(DSTROOT)/System/Library/LaunchDaemons
39 install -m 0644 -o root -g wheel com.apple.bsd.dirhelper.plist $(DSTROOT)/System/Library/LaunchDaemons/
40 install -m 0755 -o root -g wheel -d $(DSTROOT)/usr/libexec
41 install -m 0755 -o root -g wheel $(SYMROOT)/dirhelper $(DSTROOT)/usr/libexec/
42 strip -S $(DSTROOT)/usr/libexec/dirhelper
43 mkdir -p "$(DSTROOT)/usr/share/man/man8"
44 gzip -c "$(SRCDIR)/dirhelper.8" > "$(DSTROOT)/usr/share/man/man8/dirhelper.8.gz"
48 tar cf - . | tar xf - -C "$(SRCDIR)"
52 cd $(OBJDIR) && mig -sheader dirhelperServer.h /usr/local/include/dirhelper.defs
55 @echo nothing to install
58 # install -m 0755 -o root -g wheel -d $(DSTROOT)/usr/local/include
59 # install -m 0644 -o root -g wheel $(OBJDIR)/dirhelper.h $(DSTROOT)/usr/local/include/
62 -rm -f *.o client dirhelper