[Fedora-directory-commits] esc/src/lib/coolkey common.mk, NONE, 1.1 Mac-universal.mk, NONE, 1.1

Jack Magne (jmagne) fedora-directory-commits at redhat.com
Wed Jan 10 02:22:28 UTC 2007


Author: jmagne

Update of /cvs/dirsec/esc/src/lib/coolkey
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4484

Added Files:
	common.mk Mac-universal.mk 
Log Message:
Mac univeral binary.


--- NEW FILE common.mk ---
#! gmake
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; version 2 of the License.
#
# This Program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA.
#
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK


#######################################################################
# (1) Include initial platform-independent assignments (MANDATORY).   #
#######################################################################

include manifest.mn

include config.mk

#######################################################################
# (2) Include "global" configuration information. (OPTIONAL)          #
#######################################################################

include $(CORE_DEPTH)/coreconf/config.mk

#only want the library
SHARED_LIBRARY=
IMPORT_LIBRARY=

#######################################################################
# (3) Include "component" configuration information. (OPTIONAL)       #
#######################################################################

DEFINES += -DDLL_PREFIX=\"$(DLL_PREFIX)\"
DEFINES += -DDLL_SUFFIX=\"$(DLL_SUFFIX)\"

ifdef DARWIN_GCC_VERSION
        echo "blooie"
        sudo gcc_select $(GCC_VERSION)
endif

#######################################################################
# (4) Include "local" platform-dependent assignments (OPTIONAL).      #
#######################################################################

#include config.mk

#######################################################################
# (5) Execute "global" rules. (OPTIONAL)                              #
#######################################################################

include $(CORE_DEPTH)/coreconf/rules.mk

#######################################################################
# (6) Execute "component" rules. (OPTIONAL)                           #
#######################################################################



#######################################################################
# (7) Execute "local" rules. (OPTIONAL).                              #
#######################################################################

UNIVERSAL_OFFSET=
ifeq ($(OS_ARCH), Darwin)

UNIVERSAL_OFFSET=i386
XULRUNNER_BASE=$(CORE_DEPTH)/dist/$(OBJDIR)//xulrunner_build/$(UNIVERSAL_OFFSET)

DEFINES += -I$(XULRUNNER_BASE)/dist/public/nss -I$(XULRUNNER_BASE)/dist/include/nspr
CFLAGS +=  $(OSX_ARCH_FLAGS)  

ifdef CKY_INCLUDE
CFLAGS += -I $(CKY_INCLUDE)
endif

endif


--- NEW FILE Mac-universal.mk ---
#! gmake
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; version 2 of the License.
#
# This Program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#       
# You should have received a copy of the GNU General Public License along with
# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA.
#
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK



UNIVERSAL_OFFSET_PPC=ppc
UNIVERSAL_OFFSET_386=i386

DARWIN_LIB_NAME=libckymanager.a

CORE_DEPTH=../../..
include $(CORE_DEPTH)/coreconf/config.mk

all libs:
 
	mkdir -p $(UNIVERSAL_OFFSET_PPC)
	mkdir -p $(UNIVERSAL_OFFSET_386)
	sudo gcc_select 4.0
	echo "Build i386."
	make -f common.mk OSX_ARCH_FLAGS="-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"


	cp $(OBJDIR)/$(DARWIN_LIB_NAME) $(UNIVERSAL_OFFSET_386)
	make -f common.mk clean
	sudo gcc_select 3.3
	echo "Build ppc."
	make -f common.mk OSX_ARCH_FLAGS="-arch ppc" CKY_INCLUDE=/usr/local/CoolKey/include
	cp $(OBJDIR)/$(DARWIN_LIB_NAME) $(UNIVERSAL_OFFSET_PPC)

	lipo -create $(UNIVERSAL_OFFSET_PPC)/$(DARWIN_LIB_NAME) $(UNIVERSAL_OFFSET_386)/$(DARWIN_LIB_NAME) -output $(OBJDIR)/$(DARWIN_LIB_NAME)

	ranlib $(OBJDIR)/$(DARWIN_LIB_NAME)
	make -f common.mk install

	sudo gcc_select 4.0

clean:
	"Darwing clean."
	make -f common.mk  clean




More information about the Fedora-directory-commits mailing list