Home | History | Annotate | Download | only in isnsd
      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 (the "License").
      6 # You may not use this file except in compliance with the License.
      7 #
      8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9 # or http://www.opensolaris.org/os/licensing.
     10 # See the License for the specific language governing permissions
     11 # and limitations under the License.
     12 #
     13 # When distributing Covered Code, include this CDDL HEADER in each
     14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15 # If applicable, add the following below this CDDL HEADER, with the
     16 # fields enclosed by brackets "[]" replaced with your own identifying
     17 # information: Portions Copyright [yyyy] [name of copyright owner]
     18 #
     19 # CDDL HEADER END
     20 #
     21 #
     22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     23 # Use is subject to license terms.
     24 #
     25 
     26 PROG = isns
     27 
     28 DSRC = isns_provider.d
     29 DTRACE_HEADER = $(DSRC:%.d=%.h)
     30 
     31 COBJS	= main.o qry.o admintf.o dsapi.o log.o sched.o dseng.o scn.o cache.o
     32 COBJS	+= dump.o msgq.o server.o config.o esi.o obj.o utils.o dd.o func.o
     33 COBJS	+= pdu.o door.o htable.o
     34 OBJS	= $(COBJS) $(DSRC:%.d=%.o)
     35 SRCS	= $(COBJS:%.o=%.c)
     36 POFILE= isns.po
     37 POFILES	= $(COBJS:%.o=%.po)
     38 
     39 include ../../Makefile.cmd
     40 
     41 DATA_STORE	= xml
     42 XML_DIR		= xml_def
     43 ISNS_SVC	= $(XML_DIR)/isns_server.xml
     44 
     45 MANIFEST	= isns_server.xml
     46 ROOTMANIFESTDIR	= $(ROOTSVCNETWORK)
     47 $(ROOTSVCNETWORK)/isns_server.xml	:= FILEMODE = 0444
     48 
     49 CFLAGS 		+=	$(CCVERBOSE)
     50 CPPFLAGS 	+= -I./ -I/usr/include/libxml2
     51 CPPFLAGS	+= -DTARGET_DATA_STORE=$(DATA_STORE)
     52 CPPFLAGS	+= -D_POSIX_PTHREAD_SEMANTICS
     53 LINTFLAGS += -xerroff=E_BAD_PTR_CAST_ALIGN
     54 LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2
     55 LINTFLAGS += -xerroff=E_CASE_FALLTHRU
     56 
     57 obj.o := CERRWARN += -erroff=E_CONST_OBJ_SHOULD_HAVE_INITIZR
     58 obj.o := CERRWARN += -erroff=E_IMPLICIT_DECL_FUNC_RETURN_INT
     59 
     60 LDLIBS		+= -lsecdb -lsocket -lnsl -lscf -lxml2
     61 
     62 .KEEP_STATE:
     63 
     64 all:	$(PROG)
     65 
     66 $(PROG): $(OBJS)
     67 	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
     68 	$(POST_PROCESS)
     69 
     70 %.h: %.d
     71 	$(DTRACE) -xnolibs -h -s $< -o $@
     72 
     73 %.o:	%.c $(DTRACE_HEADER)
     74 	$(COMPILE.c) $<
     75 	$(POST_PROCESS_O)
     76 
     77 %.o:	%.d $(COBJS)
     78 	$(COMPILE.d) -xnolibs -s $< $(COBJS)
     79 	$(POST_PROCESS_O)
     80 
     81 clean:
     82 	$(RM) $(OBJS)
     83 
     84 lint:	lint_SRCS
     85 
     86 $(POFILE): $(POFILES)
     87 	$(RM) $@
     88 	$(CAT) $(POFILES) > $@
     89 
     90 check:	$(CHKMANIFEST)
     91 
     92 include ../../Makefile.targ
     93 
     94 install: all .WAIT $(ROOTUSRSBINPROG) $(ROOTMANIFEST)
     95