Home | History | Annotate | Download | only in dns
      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/CDDL.txt
      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/CDDL.txt.
     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 #
     23 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
     24 # Use is subject to license terms.
     25 #
     26 #ident	"@(#)Makefile	1.22	07/08/15 SMI"
     27 #
     28 # cmd/ha-services/dns/Makefile
     29 #
     30 
     31 
     32 SRCS =	dns_svc_start.c \
     33 	dns_svc_stop.c \
     34 	dns_validate.c \
     35 	dns_update.c \
     36 	dns_monitor_start.c \
     37 	dns_monitor_stop.c \
     38 	dns_monitor_check.c \
     39 	dns_probe.c
     40 
     41 PROG = $(SRCS:%.c=%)
     42 
     43 OBJS = $(SRCS:%.c=%.o)
     44 
     45 DS_COMMON = $(SRC)/cmd/ha-services/common
     46 LIBDS_COMMON_ARCH = $(MACH)
     47 
     48 DS_COMMON_SRCS = $(DS_COMMON)/ds_utils.c \
     49 	$(DS_COMMON)/ds_http.c
     50 
     51 COMMON_SRCS = dns.c
     52 COMMON_OBJS = $(COMMON_SRCS:%.c=%.o)
     53 
     54 OBJECTS = $(OBJS) $(COMMON_OBJS)
     55 
     56 include ../../Makefile.cmd
     57 
     58 PKGNAME = SUNWscdns
     59 RTRFILE = SUNW.dns
     60 
     61 TEXT_DOMAIN = SUNW_SC_DNS
     62 MESSAGE_DIR = /opt/$(PKGNAME)/lib/locale
     63 PIFILES = $(SRCS:%.c=%.pi) $(COMMON_SRCS:%.c=%.pi) \
     64 	  $(DS_COMMON_SRCS:%.c=%.pi)
     65 POFILE = dns-ds.po
     66 
     67 CPPFLAGS += -I$(DS_COMMON)
     68 
     69 LDLIBS  += -ldsdev -lscha
     70 LDLIBS  += -L$(DS_COMMON)/$(LIBDS_COMMON_ARCH) -lds_common
     71 
     72 $(POST_S9_BUILD)COPTFLAG += -DPOST_S9_BUILD
     73 
     74 LINTFLAGS += -I$(DS_COMMON)
     75 LINTFILES += $(SRCS:%.c=%.ln) $(COMMON_SRCS:%.c=%.ln)
     76 
     77 .KEEP_STATE:
     78 
     79 all: $(COMMON_OBJS) $(PROG) $(ROOTOPTETCRTR)
     80 
     81 .PARALLEL: $(PROG)
     82 
     83 install: all $(ROOTOPTBINPROG)
     84 
     85 include ../../Makefile.targ
     86 
     87 $(SRCS:%.c=%): $(COMMON_OBJS) $$(@:%=%.o)
     88 	$(LINK.c) -o $@ $(@:%=%.c) $(COMMON_OBJS) $(LDFLAGS) $(LDLIBS)
     89 	$(POST_PROCESS)
     90 
     91 clean:
     92 	$(RM) $(PROG) $(OBJS) $(COMMON_OBJS)
     93