## # PAMModule.defs ## # Luke Howard ## #RC_JASPER=YES # # If ModuleIsBundle is YES, then bundles are # built to wrap the module DSOs. # ModuleIsBundle = NO ifndef CoreOSMakefiles CoreOSMakefiles = $(MAKEFILEPATH)/CoreOS endif ifndef BuildDirectory BuildDirectory = . endif ifndef Sources Sources = . endif Extra_CC_Flags += -Ddarwin -no-cpp-precomp -Wall -I/usr/include/pam -arch i386 -arch ppc Extra_LD_Libraries += -lpam -arch i386 -arch ppc include $(CoreOSMakefiles)/Standard/Standard.make ifdef Project DSTROOT = /tmp/$(Project)/Release endif ifeq ($(ModuleIsBundle),YES) PAMModuleExtension = bundle PAMModuleWrapper = $(PAMModuleName).$(PAMModuleExtension) PAMModuleBundle = $(PAMModuleWrapper)/$(PAMModuleName) else PAMModuleExtension = so PAMModuleBundle = $(PAMModuleName).$(PAMModuleExtension) endif ifndef PAMModuleSources PAMModuleSources = $(BuildDirectory)/$(PAMModuleName).c endif ifndef PAMModuleObjects PAMModuleObjects = $(PAMModuleSources:.c=.o) endif all:: $(PAMModuleBundle) $(PAMModuleBundle): $(PAMModuleObjects) $(_v) /bin/echo "Building $(PAMModuleBundle)..." ifeq ($(ModuleIsBundle),YES) $(_v) $(MKDIR) $(BuildDirectory)/$(PAMModuleWrapper) endif $(_v) $(CC) $(LDFLAGS) $(CFLAGS) -bundle -o $(BuildDirectory)/$@ $(PAMModuleObjects) install: $(PAMModuleBundle) ifeq ($(ModuleIsBundle),YES) $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)/usr/lib/pam/$(PAMModuleWrapper) else $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)/usr/lib/pam endif $(_v) $(INSTALL) -c -m $(Install_File_Mode) \ $(BuildDirectory)/$(PAMModuleBundle) \ $(DSTROOT)/usr/lib/pam/$(PAMModuleBundle) clean:: ifeq ($(ModuleIsBundle),YES) $(_v) (cd $(BuildDirectory) && $(RM) -rf $(PAMModuleWrapper)) endif $(_v) (cd $(BuildDirectory) && $(RM) $(PAMModuleBundle) $(PAMModuleObjects)) ifdef LinuxPAMSourceFiles $(_v) (cd $(BuildDirectory) && $(RM) $(PAMModuleSources)) endif ifdef LinuxPAMSourceFiles $(PAMModuleSources): $(LinuxPAMSourceFiles) $(_v) (cd $(BuildDirectory) && ln -sf $(LinuxPAMSourceFiles) . ) endif