Home | History | Annotate | Download | only in apache
      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 #
     24 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
     25 # Use is subject to license terms.
     26 #
     27 #ident	"@(#)Makefile	1.30	07/06/06 SMI"
     28 #
     29 # cmd/ha-services/apache/Makefile
     30 #
     31 
     32 DS_COMMON = $(SRC)/cmd/ha-services/common
     33 
     34 DS_COMMON_SRCS = $(DS_COMMON)/ds_utils.c \
     35 	$(DS_COMMON)/ds_http.c
     36 
     37 LIBDS_COMMON_ARCH = $(MACH)
     38 
     39 SRCS =	apache_svc_start.c \
     40 	apache_svc_stop.c \
     41 	apache_validate.c \
     42 	apache_update.c \
     43 	apache_monitor_start.c \
     44 	apache_monitor_stop.c \
     45 	apache_monitor_check.c \
     46 	apache_probe.c
     47 
     48 PROG = $(SRCS:%.c=%)
     49 
     50 OBJS = $(SRCS:%.c=%.o)
     51 
     52 SUBDIRS = dsconfig
     53 
     54 include $(SRC)/Makefile.subdirs
     55 
     56 COMMON_SRCS = apache.c
     57 COMMON_OBJS = $(COMMON_SRCS:%.c=%.o)
     58 
     59 OBJECTS = $(OBJS) $(COMMON_OBJS)
     60 
     61 include ../../Makefile.cmd
     62 
     63 LINTFLAGS += -I$(DS_COMMON)
     64 LINTFILES += apache.ln
     65 
     66 # Packaging
     67 PKGNAME = SUNWscapc
     68 RTRFILE = SUNW.apache
     69 
     70 TEXT_DOMAIN = SUNW_SC_APC
     71 MESSAGE_DIR = /opt/$(PKGNAME)/lib/locale
     72 PIFILES = $(SRCS:%.c=%.pi) $(COMMON_SRCS:%.c=%.pi) $(DS_COMMON_SRCS:%.c=%.pi)
     73 POFILE = apc-ds.po
     74 
     75 CFLAGS += -I$(DS_COMMON)
     76 
     77 LDLIBS	+= -ldsdev -lscha
     78 LDLIBS  += -L$(DS_COMMON)/$(LIBDS_COMMON_ARCH) -lds_common
     79 
     80 .KEEP_STATE:
     81 
     82 all: $(COMMON_OBJS) $(PROG) $(ROOTOPTETCRTR)
     83 
     84 .PARALLEL: $(PROG)
     85 
     86 install: all $(ROOTOPTBINPROG) 
     87 
     88 include ../../Makefile.targ
     89 
     90 $(SRCS:%.c=%): $(COMMON_OBJS) $$(@:%=%.o)
     91 	$(LINK.c) -o $@ $(@:%=%.c) $(COMMON_OBJS) $(LDFLAGS) $(LDLIBS)
     92 	$(POST_PROCESS)
     93 
     94 clean:
     95 	$(RM) $(PROG) $(OBJS) $(COMMON_OBJS)
     96