Home | History | Annotate | Download | only in fcsm
      1 #
      2 # CDDL HEADER START
      3 #
      4 # The contents of this file are subject to the terms of the
      5 # Common Development and Distribution License, Version 1.0 only
      6 # (the "License").  You may not use this file except in compliance
      7 # with the License.
      8 #
      9 # You can obtain a copy of the license at src/sun_nws/OPENSOLARIS.LICENSE
     10 # or http://www.opensolaris.org/os/licensing.
     11 # See the License for the specific language governing permissions
     12 # and limitations under the License.
     13 #
     14 # When distributing Covered Code, include this CDDL HEADER in each
     15 # file and include the License file at src/sun_nws/OPENSOLARIS.LICENSE.
     16 # If applicable, add the following below this CDDL HEADER, with the
     17 # fields enclosed by brackets "[]" replaced with your own identifying
     18 # information: Portions Copyright [yyyy] [name of copyright owner]
     19 #
     20 # CDDL HEADER END
     21 #
     22 #
     23 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
     24 # Use is subject to license terms.
     25 #
     26 #ident	"@(#)Makefile	1.9	05/10/18 SMI"
     27 #
     28 # src/sun_nws/fcsm/Makefile
     29 #
     30 
     31 include ../Makefile.config
     32 include ../Makefile.drvrs
     33 
     34 # The following two lines make sure that on sparc the 64 bit version is the
     35 # only one built (sparcv9) and or x86 the 32 bit and 64 bit versions are both
     36 # built.
     37 BUILD32	= $(MACH32:sparc=$(POUND_SIGN))
     38 BUILD32	= $(MACH32:i386=)
     39 
     40 sparc_STAGING32	 = $(PROTO_ROOT)/kernel/drv
     41 sparc_STAGING64	 = $(STAGING32)/sparcv9
     42 
     43 i386_STAGING32	 = $(PROTO_ROOT)/kernel/drv
     44 i386_STAGING64	 = $(STAGING32)/amd64
     45 
     46 STAGING32	 = $($(MACH)_STAGING32)
     47 STAGING64	 = $($(MACH)_STAGING64)
     48 
     49 MODULE  	= fcsm
     50 
     51 CONFFILE	= fcsm.conf
     52 
     53 MODULE_PKGS	 = SUNWfcsm
     54 
     55 MODULE_SRC	 = fcsm.c 
     56 
     57 # Kernel Module Dependencies
     58 LDFLAGS += -dy -Nmisc/fctl
     59 
     60 MODULE_OBJ_32   = $(MODULE_SRC:%.c=$(OBJ32)/%.o)
     61 MODULE_OBJ_64   = $(MODULE_SRC:%.c=$(OBJ64)/%.o)
     62 
     63 
     64 $(BUILD32)BINARY32	= $(OBJ32)/$(MODULE)
     65 $(BUILD64)BINARY64	= $(OBJ64)/$(MODULE)
     66 BINARIES		= $(BINARY32) $(BINARY64)
     67 
     68 $(BUILD32)LINT_TARGETS     = lint32
     69 $(BUILD64)LINT_TARGETS    += lint64
     70 
     71 COMMON_INCLUDES  = -I$(COM_INC_FC)
     72 COMMON_INCLUDES += -I$(COMMON_FC_IMPL_HDRS_DIR)
     73 COMMON_INCLUDES += -I$(MOD_INC_FCTL)
     74 
     75 $(BUILD32)ALLPREQ 	+= $(OBJ32)
     76 $(BUILD64)ALLPREQ 	+= $(OBJ64)
     77 ALLPREQ			+= .WAIT
     78 ALLPREQ			+= $(BINARIES)
     79 
     80 INSTALLPREQ		 = all
     81 INSTALLPREQ		+= .WAIT
     82 $(BUILD32)INSTALLPREQ	+= $(STAGING32) 
     83 $(BUILD64)INSTALLPREQ	+= $(STAGING64) 
     84 INSTALLPREQ		+= .WAIT
     85 INSTALLPREQ		+= $(STAGING32)/$(CONFFILE)
     86 $(BUILD32)INSTALLPREQ	+= $(STAGING32)/$(MODULE)
     87 $(BUILD64)INSTALLPREQ	+= $(STAGING64)/$(MODULE)
     88 
     89 PKGPREQ		 = install
     90 PKGPREQ		+= .WAIT 
     91 PKGPREQ         += $(PKGAREA) 
     92 PKGPREQ         += .WAIT
     93 PKGPREQ         += $(MODULE_PKGS:%=$(PKGAREA)/%)
     94 
     95 CLEANFILES  = $(MODULE_OBJ_32) $(MODULE_OBJ_64)
     96 
     97 CLEANWARFILES = 
     98 
     99 CLOBBERFILES  = $(CLEANWARFILES)
    100 CLOBBERFILES += $(MOD_LINT_LIB)
    101 
    102 NUKEFILES  = $(CLOBBERFILES)
    103 NUKEFILES += $(STAGING32)/$(CONFFILE)
    104 NUKEFILES += $(STAGING32)/$(MODULE)
    105 NUKEFILES += $(STAGING64)/$(MODULE)
    106 NUKEFILES += $(MODULE_PKGS:%=$(PKGAREA)/%)
    107 
    108 include ../Makefile.common
    109 
    110 #
    111 # Builddate
    112 #
    113 BUILD_DATE:sh=  date +%\Y%m%d
    114 CPPFLAGS32	+= -DBUILD_DATE=\"$(BUILD_DATE)\"
    115 CPPFLAGS64	+= -DBUILD_DATE=\"$(BUILD_DATE)\"
    116 
    117