Makefile.postamble   [plain text]


###############################################################################
#  Makefile.postamble
#  Copyright 1997, Apple Computer, Inc.
#
#  Use this makefile, which is imported after all other makefiles, to
#  override attributes for a project's Makefile environment. This allows you  
#  to take advantage of the environment set up by the other Makefiles. 
#  You can also define custom rules at the end of this file.
#
###############################################################################
# 
# These variables are exported by the standard makefiles and can be 
# used in any customizations you make.  They are *outputs* of
# the Makefiles and should be used, not set.
# 
#  PRODUCTS: products to install.  All of these products will be placed in
#	 the directory $(DSTROOT)$(INSTALLDIR)
#  GLOBAL_RESOURCE_DIR: The directory to which resources are copied.
#  LOCAL_RESOURCE_DIR: The directory to which localized resources are copied.
#  OFILE_DIR: Directory into which .o object files are generated.
#  DERIVED_SRC_DIR: Directory used for all other derived files
#
#  ALL_CFLAGS:  flags to pass when compiling .c files
#  ALL_MFLAGS:  flags to pass when compiling .m files
#  ALL_CCFLAGS:  flags to pass when compiling .cc, .cxx, and .C files
#  ALL_MMFLAGS:  flags to pass when compiling .mm, .mxx, and .M files
#  ALL_PRECOMPFLAGS:  flags to pass when precompiling .h files
#  ALL_LDFLAGS:  flags to pass when linking object files
#  ALL_LIBTOOL_FLAGS:  flags to pass when libtooling object files
#  ALL_PSWFLAGS:  flags to pass when processing .psw and .pswm (pswrap) files
#  ALL_RPCFLAGS:  flags to pass when processing .rpc (rpcgen) files
#  ALL_YFLAGS:  flags to pass when processing .y (yacc) files
#  ALL_LFLAGS:  flags to pass when processing .l (lex) files
#
#  NAME: name of application, bundle, subproject, palette, etc.
#  LANGUAGE: langage in which the project is written (default "English")
#  LOCAL_RESOURCES: localized resources (e.g. nib's, images) of project
#  GLOBAL_RESOURCES: non-localized resources of project
#
#  SRCROOT:  base directory in which to place the new source files
#  SRCPATH:  relative path from SRCROOT to present subdirectory
#
#  INSTALLDIR: Directory the product will be installed into by 'install' target
#  PUBLIC_HDR_INSTALLDIR: where to install public headers.  Don't forget
#        to prefix this with DSTROOT when you use it.
#  PRIVATE_HDR_INSTALLDIR: where to install private headers.  Don't forget
#	 to prefix this with DSTROOT when you use it.
#
#  EXECUTABLE_EXT: Executable extension for the platform (i.e. .exe on Windows)
#
###############################################################################

# Some compiler flags can be overridden here for certain build situations.
#
#    WARNING_CFLAGS:  flag used to set warning level (defaults to -Wmost)
#    DEBUG_SYMBOLS_CFLAGS:  debug-symbol flag passed to all builds (defaults
#	to -g)
#    DEBUG_BUILD_CFLAGS:  flags passed during debug builds (defaults to -DDEBUG)
#    OPTIMIZE_BUILD_CFLAGS:  flags passed during optimized builds (defaults
#	to -O)
#    PROFILE_BUILD_CFLAGS:  flags passed during profile builds (defaults
#	to -pg -DPROFILE)
#    LOCAL_DIR_INCLUDE_DIRECTIVE:  flag used to add current directory to
#	the include path (defaults to -I.)
#    DEBUG_BUILD_LDFLAGS, OPTIMIZE_BUILD_LDFLAGS, PROFILE_BUILD_LDFLAGS: flags
#	passed to ld/libtool (defaults to nothing)


# Library and Framework projects only:
#    INSTALL_NAME_DIRECTIVE:  This directive ensures that executables linked
#	against the framework will run against the correct version even if
#	the current version of the framework changes.  You may override this
#	to "" as an alternative to using the DYLD_LIBRARY_PATH during your
#	development cycle, but be sure to restore it before installing.


# Ownership and permissions of files installed by 'install' target

#INSTALL_AS_USER = root
        # User/group ownership 
#INSTALL_AS_GROUP = wheel
        # (probably want to set both of these) 
#INSTALL_PERMISSIONS =
        # If set, 'install' chmod's executable to this


# Options to strip.  Note: -S strips debugging symbols (executables can be stripped
# down further with -x or, if they load no bundles, with no options at all).

#STRIPFLAGS = -S


#########################################################################
# Put rules to extend the behavior of the standard Makefiles here.  Include them in
# the dependency tree via cvariables like AFTER_INSTALL in the Makefile.preamble.
#
# You should avoid redefining things like "install" or "app", as they are
# owned by the top-level Makefile API and no context has been set up for where 
# derived files should go.
#

#
# Remove the library which is only used during the build process.
#
after_install:
	$(RM) -rf $(INSTALLED_PRODUCTS)

ipconfig_before_installhdrs: $(OFILE_DIR)

gen: genoptionfiles
	rm -f gen_dhcp*.h
	cc -o genoptionfiles genoptionfiles.c
	./genoptionfiles -table > gen_dhcp_parse_table.h
	./genoptionfiles -dhcptag > gen_dhcp_tags.h
	./genoptionfiles -dhcptype > gen_dhcp_types.h
	chmod 444 gen_dhcp*.h

sharepoints:
	cc -Wno-four-char-constants -o shp $(OTHER_CFLAGS) -DTEST_SHAREPOINTS sharepoints.c -F$(NEXT_ROOT)/System/Library/PrivateFrameworks -framework ServerControl -framework ServerPrefix -framework AFPDefines

nilist: NICache.c NICache.h
	cc -g -o nilist -DNICACHE_TEST NICache.c dynarray.c ptrlist.c netinfo.c host_identifier.c util.c NIDomain.c

afpusers:
	cc -g -o afpusers -DTEST_AFPUSERS AFPUsers.c NICache.c dynarray.c ptrlist.c netinfo.c host_identifier.c util.c NIDomain.c

readtest:
	cc -g -o readtest -DREAD_TEST NICache.c dynarray.c ptrlist.c netinfo.c host_identifier.c util.c NIDomain.c

arp: arp.c arp.h
	cc -g -o arp -DMAIN arp.c

nihosts:
	cc -g -o nihosts -DTEST_NIHOSTS NIHosts.m util.c NIDomain.c dynarray.c ptrlist.c netinfo.c host_identifier.c

interfaces: interfaces.c interfaces.h
	cc -g -o interfaces -DTEST_INTERFACES interfaces.c ptrlist.c dynarray.c -I$(NET_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders

dhcpopt: dhcp_options.c
	cc -g -DTEST_DHCP_OPTIONS -o dhcpopt dhcp_options.c ptrlist.c util.c

nbsp: nbsp.c nbsp.h
	cc -g -DTEST_NBSP -o nbsp nbsp.c ptrlist.c dynarray.c

hfsvols: hfsvols.c hfsvols.h
	cc -g -DTEST_HFSVOLS -o hfsvols hfsvols.c ptrlist.c dynarray.c

nbimages: nbimages.c nbimages.h
	cc -Wall -g -DTEST_NBIMAGES -o nbimages nbimages.c util.c nbsp.c ptrlist.c dynarray.c cfutil.c -framework CoreFoundation -I$(NET_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders

subnets: subnetDescr.m subnetDescr.h
	cc -Wall -g -DTEST_SUBNET_DESCR -o subnets subnetDescr.m -lobjc NIDomain.c dynarray.c ptrlist.c clientTypes.m util.c