From owner-p4-projects@FreeBSD.ORG Mon May 3 10:00:41 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 80FFD16A543; Mon, 3 May 2004 10:00:41 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A4D316A541 for ; Mon, 3 May 2004 10:00:41 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3699C43D45 for ; Mon, 3 May 2004 10:00:40 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i43H0eGe069319 for ; Mon, 3 May 2004 10:00:40 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i43H0dlY069311 for perforce@freebsd.org; Mon, 3 May 2004 10:00:39 -0700 (PDT) (envelope-from cvance@nailabs.com) Date: Mon, 3 May 2004 10:00:39 -0700 (PDT) Message-Id: <200405031700.i43H0dlY069311@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@nailabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 52146 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2004 17:00:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=52146 Change 52146 by cvance@cvance_g5 on 2004/05/03 10:00:36 Rework the build environment quite a bit. Most newly added Makefiles now require bsdmake instead of the default make (which is gnumake). Hopefully the build is much more self-contained at this point, and it's possible to specify an alternate installation directory. This system still needs quite a bit of testing, and not at pieces are hooked in yet (mach_init, wslogin, etc). Affected files ... .. //depot/projects/trustedbsd/sedarwin73/Makeconfig#2 edit .. //depot/projects/trustedbsd/sedarwin73/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin73/apsl/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin73/apsl/bootstrap_cmds/Makefile#3 edit .. //depot/projects/trustedbsd/sedarwin73/apsl/bootstrap_cmds/migcom.tproj/Makefile#4 edit .. //depot/projects/trustedbsd/sedarwin73/apsl/bootstrap_cmds/migcom.tproj/Makefile.postamble#4 edit .. //depot/projects/trustedbsd/sedarwin73/apsl/bootstrap_cmds/migcom.tproj/Makefile.preamble#4 edit .. //depot/projects/trustedbsd/sedarwin73/apsl/file_cmds/Makefile#3 edit .. //depot/projects/trustedbsd/sedarwin73/apsl/file_cmds/ls/Makefile#3 edit .. //depot/projects/trustedbsd/sedarwin73/apsl/file_cmds/ls/Makefile.postamble#3 edit .. //depot/projects/trustedbsd/sedarwin73/apsl/file_cmds/ls/Makefile.preamble#3 edit .. //depot/projects/trustedbsd/sedarwin73/etc/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin73/export/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin73/extattr_cmds/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin73/extattr_cmds/extattr/rmextattr.c#1 branch .. //depot/projects/trustedbsd/sedarwin73/extattr_cmds/extattrcmds.c#2 delete .. //depot/projects/trustedbsd/sedarwin73/extattr_cmds/extattrctl.8#2 delete .. //depot/projects/trustedbsd/sedarwin73/extattr_cmds/extattrctl.c#2 delete .. //depot/projects/trustedbsd/sedarwin73/extattr_cmds/extattrctl/extattrctl.8#1 branch .. //depot/projects/trustedbsd/sedarwin73/extattr_cmds/extattrctl/extattrctl.c#1 branch .. //depot/projects/trustedbsd/sedarwin73/libextattr/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin73/libmac/Makefile#3 edit .. //depot/projects/trustedbsd/sedarwin73/libsebsd/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin73/mac_cmds/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin73/mac_cmds/getfmac/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin73/mac_cmds/getpmac/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin73/mac_cmds/mexec/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin73/mac_cmds/setfsmac/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin73/mac_cmds/setpmac/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin73/other/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/Makefile#4 delete .. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/Makefile#4 edit .. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/Makefile.postamble#4 edit .. //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/Makefile.preamble#4 edit .. //depot/projects/trustedbsd/sedarwin73/policy/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin73/sebsd_cmds/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin73/sebsd_cmds/checkpolicy/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin73/sebsd_cmds/loadpolicy/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin73/sebsd_cmds/newrole/Makefile#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin73/Makeconfig#2 (text+ko) ==== @@ -1,7 +1,35 @@ +# Set this to the root of the darwin kernel source. +SEDARWIN_ROOT = /Volumes/Space/cvance/trustedbsd/sedarwin73 -# Set this to the root of the darwin kernel source. -DARWIN = /Users/andrew/p4/sedarwin73/apsl/xnu +# Set the following variable to the installation directory +# or leave blank for "/" +#DESTDIR = +DESTDIR = $(SEDARWIN_ROOT)/export/root + +# if you aren't going to install as root, you need to set the +# user for +#EXPORT_OWNER= +EXPORT_OWNER= cvance + +# +# You shouldn't have to edit anything else +# +DARWIN = $(SEDARWIN_ROOT)/apsl/xnu EXPORT_HDRS = $(DARWIN)/BUILD/obj/EXPORT_HDRS +CFLAGS += -I$(EXPORT_HDRS)/bsd -I$(EXPORT_HDRS)/osfmk -I$(EXPORT_HDRS) +LDADD+= -L$(SEDARWIN_ROOT)/libsebsd -L$(SEDARWIN_ROOT)/libmac +POLICYDIR= $(DESTDIR)/ +BINDIR= /usr/bin -CFLAGS += -I$(EXPORT_HDRS)/bsd -I$(EXPORT_HDRS) +# DSTROOT is used by projectbuilder Makefiles +DSTROOT= $(DESTDIR) + +BINOWN= $(EXPORT_OWNER) +BINGRP= $(EXPORT_OWNER) +LIBOWN= $(EXPORT_OWNER) +LIBGRP= $(EXPORT_OWNER) +INCOWN= $(EXPORT_OWNER) +INCGRP= $(EXPORT_OWNER) +MANOWN= $(EXPORT_OWNER) +MANGRP= $(EXPORT_OWNER) ==== //depot/projects/trustedbsd/sedarwin73/apsl/bootstrap_cmds/Makefile#3 (text+ko) ==== @@ -1,48 +1,7 @@ -# -# Generated by the NeXT Project Builder. -# -# NOTE: Do NOT change this file -- Project Builder maintains it. -# -# Put all of your customizations in files called Makefile.preamble -# and Makefile.postamble (both optional), and Makefile will include them. -# +include ../../Makeconfig -NAME = bootstrap_cmds +SUBDIR= migcom.tproj -PROJECTVERSION = 2.8 -PROJECT_TYPE = Aggregate +MAKE=gnumake -TOOLS = migcom.tproj config.tproj relpath.tproj decomment.tproj - -OTHERSRCS = Makefile.preamble Makefile Makefile.postamble\ - vers_string.sh vers_string.1 - -MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles -CODE_GEN_STYLE = DYNAMIC -MAKEFILE = aggregate.make -LIBS = -DEBUG_LIBS = $(LIBS) -PROF_LIBS = $(LIBS) - - -NEXTSTEP_PB_CFLAGS = -DNeXT - - -NEXTSTEP_BUILD_OUTPUT_DIR = /tmp/bootstrap_cmds - -NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc -WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc -PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc -NEXTSTEP_JAVA_COMPILER = /usr/bin/javac -WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe -PDO_UNIX_JAVA_COMPILER = $(JDKBINDIR)/javac - -include $(MAKEFILEDIR)/platform.make - --include Makefile.preamble - -include $(MAKEFILEDIR)/$(MAKEFILE) - --include Makefile.postamble - --include Makefile.dependencies +.include ==== //depot/projects/trustedbsd/sedarwin73/apsl/bootstrap_cmds/migcom.tproj/Makefile#4 (text+ko) ==== @@ -6,7 +6,7 @@ # Put all of your customizations in files called Makefile.preamble # and Makefile.postamble (both optional), and Makefile will include them. # - +include ../../../Makeconfig NAME = migcom PROJECTVERSION = 2.8 ==== //depot/projects/trustedbsd/sedarwin73/apsl/bootstrap_cmds/migcom.tproj/Makefile.postamble#4 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin73/apsl/bootstrap_cmds/migcom.tproj/Makefile.preamble#4 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin73/apsl/file_cmds/Makefile#3 (text+ko) ==== @@ -1,49 +1,7 @@ -# -# Generated by the NeXT Project Builder. -# -# NOTE: Do NOT change this file -- Project Builder maintains it. -# -# Put all of your customizations in files called Makefile.preamble -# and Makefile.postamble (both optional), and Makefile will include them. -# +include ../../Makeconfig -NAME = file_cmds +SUBDIR= ls -PROJECTVERSION = 2.8 -PROJECT_TYPE = Aggregate +MAKE=gnumake -TOOLS = chflags chmod chown compress cp dd df du install ln ls\ - mkdir mkfifo mknod mtree mv pax rm rmdir rmt shar tcopy\ - touch file - -OTHERSRCS = PROJECT Makefile.preamble Makefile Makefile.postamble - -MAKEFILEDIR = $(MAKEFILEPATH)/pb_makefiles -CODE_GEN_STYLE = DYNAMIC -MAKEFILE = aggregate.make -LIBS = -DEBUG_LIBS = $(LIBS) -PROF_LIBS = $(LIBS) - - -NEXTSTEP_PB_CFLAGS = -no-cpp-precomp - - -NEXTSTEP_BUILD_OUTPUT_DIR = /tmp/$(NAME)/Build - -NEXTSTEP_OBJCPLUS_COMPILER = /usr/bin/cc -WINDOWS_OBJCPLUS_COMPILER = $(DEVDIR)/gcc -PDO_UNIX_OBJCPLUS_COMPILER = $(NEXTDEV_BIN)/gcc -NEXTSTEP_JAVA_COMPILER = /usr/bin/javac -WINDOWS_JAVA_COMPILER = $(JDKBINDIR)/javac.exe -PDO_UNIX_JAVA_COMPILER = $(NEXTDEV_BIN)/javac - -include $(MAKEFILEDIR)/platform.make - --include Makefile.preamble - -include $(MAKEFILEDIR)/$(MAKEFILE) - --include Makefile.postamble - --include Makefile.dependencies +.include ==== //depot/projects/trustedbsd/sedarwin73/apsl/file_cmds/ls/Makefile#3 (text+ko) ==== @@ -7,6 +7,8 @@ # and Makefile.postamble (both optional), and Makefile will include them. # +include ../../../Makeconfig + NAME = ls PROJECTVERSION = 2.8 @@ -22,7 +24,8 @@ CODE_GEN_STYLE = DYNAMIC MAKEFILE = tool.make NEXTSTEP_INSTALLDIR = /bin -LIBS = ../../../libmac/libmac.a +OTHER_CFLAGS= -I$(EXPORT_HDRS)/bsd -I$(EXPORT_HDRS)/osfmk -I$(EXPORT_HDRS) +LIBS = -L$(SEDARWIN_ROOT)/libmac -lmac DEBUG_LIBS = $(LIBS) PROF_LIBS = $(LIBS) @@ -45,5 +48,6 @@ include $(MAKEFILEDIR)/$(MAKEFILE) -include Makefile.postamble - +CHOWN = /usr/bin/true +CHGRP = /usr/bin/true -include Makefile.dependencies ==== //depot/projects/trustedbsd/sedarwin73/apsl/file_cmds/ls/Makefile.postamble#3 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin73/apsl/file_cmds/ls/Makefile.preamble#3 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin73/etc/Makefile#2 (text+ko) ==== @@ -1,2 +1,11 @@ +include ../Makeconfig + +ETCFILES= mac.conf + install: - sudo install -m 644 -o root -g wheel mac.conf /etc + cd ${.CURDIR}; \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + $(ETCFILES) ${DESTDIR}/etc; + + +.include ==== //depot/projects/trustedbsd/sedarwin73/extattr_cmds/Makefile#2 (text+ko) ==== @@ -1,26 +1,6 @@ - include ../Makeconfig -PROGS=rmextattr getextattr lsextattr setextattr extattrctl -all: $(PROGS) +SUBDIR= extattr \ + extattrctl -rmextattr: extattrcmds.o - gcc -o rmextattr extattrcmds.o ../libextattr/libextattr.a - -lsextattr: rmextattr - ln $< $@ - -getextattr: rmextattr - ln $< $@ - -setextattr: rmextattr - ln $< $@ - -extattrctl: extattrctl.o - gcc -o extattrctl extattrctl.o ../libextattr/libextattr.a - -install: all - install -m 755 -o root -g wheel $(PROGS) /usr/sbin - -clean: - rm -f *.o rmextattr getextattr lsextattr setextattr extattrctl +.include ==== //depot/projects/trustedbsd/sedarwin73/libextattr/Makefile#2 (text+ko) ==== @@ -1,15 +1,6 @@ - include ../Makeconfig -OBJS = extattr.o +LIB= extattr +SRCS = extattr.c -libextattr.a: $(OBJS) - ar cr $@ $(OBJS) - ranlib $@ - -install: - install -m 444 -o root -g wheel libextattr.a /usr/lib - -clean: - rm -f $(OBJS) libextattr.a - +.include ==== //depot/projects/trustedbsd/sedarwin73/libmac/Makefile#3 (text+ko) ==== @@ -1,22 +1,8 @@ - include ../Makeconfig -OBJS = mac.o mac_get.o mac_set.o mac_exec.o security.o +LIB= mac +SHLIBDIR?= $(DESTDIR)/lib -VPATH = $(EXPORT_HDRS)/osfmk/mach /usr/include/mach +SRCS = mac.c mac_exec.c mac_get.c mac_set.c security.c -%.c: %.defs - mig $(CFLAGS) -user $@ -header security.h -server /dev/null -sheader /dev/null $< - -libmac.a: $(OBJS) - ar cr $@ $(OBJS) - ranlib $@ - -install: - install -m 444 -o root -g wheel libmac.a /usr/lib - -clean: - rm -f $(OBJS) libmac.a - -security.o: security.c - gcc -c -o $@ $< +.include ==== //depot/projects/trustedbsd/sedarwin73/libsebsd/Makefile#2 (text+ko) ==== @@ -1,35 +1,15 @@ - include ../Makeconfig -all: libsebsd.a +LIB= sebsd -OBJS= system.o security_get_user_contexts.o get_ordered_context_list.o \ - getseccontext.o query_user_context.o security_change_context.o \ - string_to_security_class.o security_compute_av.o context.o \ - get_default_type.o +SRCS= system.c security_get_user_contexts.c get_ordered_context_list.c \ + getseccontext.c query_user_context.c security_change_context.c \ + string_to_security_class.c security_compute_av.c context.c \ + get_default_type.c -CFLAGS+= -g -I$(EXPORT_HDRS)/security/sebsd -libsebsd.a: $(OBJS) - ar cr $@ $(OBJS) - ranlib $@ +CFLAGS+= -I$(EXPORT_HDRS)/security/sebsd +INCS= sebsd.h sebsd_context.h sebsd_fs.h sebsd_proc.h sebsd_ss.h +INCDIR= $(INCLUDEDIR)/sebsd -HDIR = /usr/include/security/sebsd -HEADERS = $(HDIR)/sebsd.h $(HDIR)/sebsd_ss.h $(HDIR)/flask_types.h $(HDIR)/linux-compat.h $(HDIR)/sebsd_context.h $(HDIR)/sebsd_proc.h $(HDIR)/sebsd_fs.h $(HDIR)/flask.h $(HDIR)/sebsd_syscalls.h - -install-headers: $(HDIR) $(HEADERS) - -install: - install -m 444 -o root -g wheel libsebsd.a /usr/lib - -$(HDIR): - mkdir -p $(HDIR) - -$(HDIR)/%.h: %.h - cp $< $@ - -$(HDIR)/%.h: $(EXPORT_HDRS)/security/sebsd/%.h - cp $< $@ - -clean: - rm -f $(OBJS) +.include ==== //depot/projects/trustedbsd/sedarwin73/mac_cmds/Makefile#2 (text+ko) ==== @@ -1,18 +1,9 @@ +include ../Makeconfig -all: - (cd getfmac ; make) - (cd getpmac ; make) - (cd mexec ; make) - (cd setfsmac ; make) +SUBDIR= getfmac \ + getpmac \ + mexec \ + setfsmac \ + setpmac -clean: - (cd getfmac ; make clean) - (cd getpmac ; make clean) - (cd mexec ; make clean) - (cd setfsmac ; make clean) - -install: - (cd getfmac ; make install) - (cd getpmac ; make install) - (cd mexec ; make install) - (cd setfsmac ; make install) +.include ==== //depot/projects/trustedbsd/sedarwin73/mac_cmds/getfmac/Makefile#2 (text+ko) ==== @@ -1,9 +1,8 @@ +include ../../Makeconfig + +PROG= getfmac +MAN8= getfmac.8 -include ../../Makeconfig +LDADD+= -lmac -getfmac: getfmac.o - gcc -o getfmac getfmac.o ../../libmac/libmac.a -install: - install -m 755 -o root -g wheel getfmac /usr/sbin -clean: - rm -f getmac.o getfmac +.include ==== //depot/projects/trustedbsd/sedarwin73/mac_cmds/getpmac/Makefile#2 (text+ko) ==== @@ -1,9 +1,8 @@ +include ../../Makeconfig + +PROG= getpmac +MAN8= getpmac.8 -include ../../Makeconfig +LDADD+= -lmac -getpmac: getpmac.o - gcc -o getpmac getpmac.o ../../libmac/libmac.a -install: - install -m 755 -o root -g wheel getpmac /usr/sbin -clean: - rm -f getpmac.o getpmac +.include ==== //depot/projects/trustedbsd/sedarwin73/mac_cmds/mexec/Makefile#2 (text+ko) ==== @@ -1,9 +1,8 @@ +include ../../Makeconfig + +PROG= mexec +NOMAN= -include ../../Makeconfig +LDADD+= -lmac -mexec: mexec.o - gcc -o mexec mexec.o ../../libmac/libmac.a -install: - install -m 755 -o root -g wheel mexec /usr/sbin -clean: - rm -f mexec.o mexec +.include ==== //depot/projects/trustedbsd/sedarwin73/mac_cmds/setfsmac/Makefile#2 (text+ko) ==== @@ -1,10 +1,9 @@ +include ../../Makeconfig + +PROG= setfsmac +MAN8= setfsmac.8 setfmac.8 -include ../../Makeconfig +LDADD+= -lmac +LINKS+= $(BINDIR)/setfsmac $(BINDIR)/setfmac -setfsmac: setfsmac.o - gcc -o setfsmac setfsmac.o ../../libmac/libmac.a -install: - install -m 755 -o root -g wheel setfsmac /usr/sbin - ln -f /usr/sbin/setfsmac /usr/sbin/setfmac -clean: - rm -f setfsmac setfsmac.o +.include ==== //depot/projects/trustedbsd/sedarwin73/mac_cmds/setpmac/Makefile#2 (text+ko) ==== @@ -1,9 +1,8 @@ +include ../../Makeconfig + +PROG= setpmac +MAN8= setpmac.8 -include ../../Makeconfig +LDADD+= -lmac -setpmac: setpmac.o - gcc -o setpmac setpmac.o ../../libmac/libmac.a -install: - install -m 755 -o root -g wheel setpmac /usr/sbin -clean: - rm -f setpmac.o setpmac +.include ==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/Makefile#4 (text+ko) ==== @@ -6,7 +6,7 @@ # Put all of your customizations in files called Makefile.preamble # and Makefile.postamble (both optional), and Makefile will include them. # - +include ../../../Makeconfig NAME = ps PROJECTVERSION = 2.8 @@ -26,7 +26,8 @@ NEXTSTEP_INSTALLDIR = /bin WINDOWS_INSTALLDIR = /Library/Executables PDO_UNIX_INSTALLDIR = /bin -LIBS = ../../../libmac/libmac.a +OTHER_CFLAGS= -I$(EXPORT_HDRS)/bsd -I$(EXPORT_HDRS)/osfmk -I$(EXPORT_HDRS) +LIBS = -L$(SEDARWIN_ROOT)/libmac -lmac DEBUG_LIBS = $(LIBS) PROF_LIBS = $(LIBS) ==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/Makefile.postamble#4 (text+ko) ==== @@ -1,6 +1,7 @@ include $(CoreOSMakefiles)/ProjectBuilder/Makefile.Postamble.Common INSTALL_PERMISSIONS = 4755 +DSTROOT= $(DESTDIR) after_install: /usr/bin/install -m 755 -d "$(DSTROOT)/usr/share/man/man1" install -c -m 644 ps.1 "$(DSTROOT)/usr/share/man/man1/ps.1" ==== //depot/projects/trustedbsd/sedarwin73/other/adv_cmds/ps.tproj/Makefile.preamble#4 (text+ko) ==== @@ -1,1 +1,2 @@ include $(MAKEFILEPATH)/CoreOS/ProjectBuilder/Makefile.Preamble.Common +DSTROOT=$(DESTDIR) ==== //depot/projects/trustedbsd/sedarwin73/policy/Makefile#2 (text+ko) ==== @@ -1,6 +1,8 @@ include ../Makeconfig -default: policy.16 +POLICY= policy.16 + +all: $(POLICY) INPUTS = flask/security_classes initial_sids \ flask/access_vectors rules.m4 users initial_sid_contexts fs_use \ @@ -9,21 +11,26 @@ policy.conf: $(INPUTS) cat $(INPUTS) > policy.conf -policy.16: policy.conf - checkpolicy -o $@ $< +$(POLICY): policy.conf + $(DESTDIR)/$(BINDIR)/checkpolicy -o $(POLICY) policy.conf rules.m4: rules - m4 -Imacros -s $< > $@ + m4 -Imacros -s rules > rules.m4 fc.out: fc sudo /Users/andrew/setfsmac -x -t -s fc /bin > fc.out genfs: fc.out - cat $< | sed -ne 's/^\/[a-zA-Z0-9\/\.]* *[^ ]*$$/genfscon hfs &/p' > $@ + cat fc.out | sed -ne 's/^\/[a-zA-Z0-9\/\.]* *[^ ]*$$/genfscon hfs &/p' > genfs clean: - rm -f bininclude policy.16 policy.conf policy.h rules.m4 fc.out \ + rm -f bininclude $(POLICY) policy.conf policy.h rules.m4 fc.out \ genfs relabel: fc - setfsmac -s $^ / + $(DESTDIR)/$(BINDIR)/setfsmac -s fc / + +install: + $(INSTALL) -o ${BINOWN} -g ${BINGRP} -m 644 ${POLICY} ${POLICYDIR} + +.include ==== //depot/projects/trustedbsd/sedarwin73/sebsd_cmds/Makefile#2 (text+ko) ==== @@ -1,16 +1,7 @@ +include ../Makeconfig -all: - (cd checkpolicy ; make) - (cd loadpolicy ; make) - (cd newrole ; make) +SUBDIR= checkpolicy \ + loadpolicy \ + newrole -clean: - (cd checkpolicy ; make clean) - (cd loadpolicy ; make clean) - (cd newrole ; make clean) - -install: - (cd checkpolicy ; make install) - (cd loadpolicy ; make install) - (cd newrole ; make install) - +.include ==== //depot/projects/trustedbsd/sedarwin73/sebsd_cmds/checkpolicy/Makefile#2 (text+ko) ==== @@ -1,23 +1,15 @@ - include ../../Makeconfig -VPATH = . $(DARWIN)/security/sebsd/ss +.PATH: $(CURDIR) ../../apsl/xnu/security/sebsd/ss -OBJS = checkpolicy.o write.o policy_parse.o policy_scan.o services.o \ - hashtab.o avtab.o ebitmap.o queue.o sidtab.o symtab.o policydb.o +PROG= checkpolicy +NOMAN= -checkpolicy: $(OBJS) - gcc -o checkpolicy $(OBJS) -lfl ../../libsebsd/libsebsd.a +SRCS = checkpolicy.c write.c policy_parse.y policy_scan.l services.c \ + hashtab.c avtab.c ebitmap.c queue.c sidtab.c symtab.c policydb.c -policy_scan.o: policy_parse.h -policy_parse.h: policy_parse.y - mv -f y.tab.h policy_parse.h - -CFLAGS += -I$(DARWIN)/security/sebsd/ss +CFLAGS+= -I../../apsl/xnu/security/sebsd/ss +LDADD+= -lsebsd -lfl YFLAGS += -d -install: - install -m 0755 -o root -g wheel checkpolicy /sbin - -clean: - rm -f $(OBJS) policy_parse.h checkpolicy +.include ==== //depot/projects/trustedbsd/sedarwin73/sebsd_cmds/loadpolicy/Makefile#2 (text+ko) ==== @@ -1,15 +1,9 @@ - include ../../Makeconfig -OBJS = sebsd_loadpolicy.o +PROG= sebsd_loadpolicy +MAN8= sebsd_loadpolicy.8 -sebsd_loadpolicy: $(OBJS) - gcc -o sebsd_loadpolicy $(OBJS) ../../libsebsd/libsebsd.a ../../libmac/libmac.a +CFLAGS+= -I../../apsl/xnu/security/sebsd/ +LDADD+= -lsebsd -lmac -install: - install -m 755 -o root -g wheel sebsd_loadpolicy /usr/sbin - -clean: - rm -f $(OBJS) sebsd_loadpolicy - -CFLAGS += -I../../apsl/xnu/security/sebsd +.include ==== //depot/projects/trustedbsd/sedarwin73/sebsd_cmds/newrole/Makefile#2 (text+ko) ==== @@ -1,15 +1,8 @@ - include ../../Makeconfig -OBJS = sebsd_newrole.o +PROG= sebsd_newrole -sebsd_newrole: $(OBJS) - gcc -o sebsd_newrole $(OBJS) ../../libsebsd/libsebsd.a ../../libmac/libmac.a -lpam +CFLAGS+= -I../../apsl/xnu/security/sebsd/ +LDADD+= -lsebsd -lmac -lpam -install: - install -m 755 -o root -g wheel sebsd_newrole /usr/sbin - -clean: - rm -f $(OBJS) sebsd_newrole - -CFLAGS += -I../../apsl/xnu/security/sebsd +.include