Home | History | Annotate | Download | only in cmd
      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 #
     23 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
     24 # Use is subject to license terms.
     25 #
     26 
     27 #
     28 # ident	"%Z%%M%	%I%	%E% SMI"
     29 #
     30 
     31 include 	../Makefile.lp
     32 
     33 OWNER = root
     34 
     35 SUBDIRS =	lptest lpadmin lpsched scripts
     36 
     37 LOCALPROG =	lpshut
     38 
     39 SBINPROG =	lpfilter lpforms lpusers
     40 
     41 LIBLINKS =	$(SBINPROG)
     42 
     43 PROG =		$(LOCALPROG) $(SBINPROG) 
     44 
     45 OBJS=	$(SBINPROG:=.o)
     46 
     47 SRCS=          $(OBJS:.o=.c)
     48 
     49 POFILE=		lp_cmd.po
     50 POFILES=	$(SRCS:%.c=%.po) lpschedlpshut.po
     51 
     52 ROOTLIBLPLOCLPROG=	$(LOCALPROG:%=$(ROOTLIBLPLOCL)/%)
     53 ROOTSBINPROG=	$(SBINPROG:%=$(ROOTUSRSBIN)/%)
     54 ROOTSYMLINKS=	$(LIBLINKS:%=$(ROOTLIB)/%)
     55 
     56 
     57 CPPFLAGS =	-I$(LPINC) $(CPPFLAGS.master)
     58 LDFLAGS +=	$(MAPFILE.NGB:%=-M%)
     59 
     60 # conditional assignments
     61 #
     62 lpfilter:=	LDLIBS += $(LIBFLT) $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBLP) \
     63 			-lgen -lsecdb
     64 lpforms:=	LDLIBS += $(LIBFRM) $(LIBMSG) $(LIBREQ) $(LIBOAM) \
     65 			$(LIBACC) $(LIBLP) -lsecdb
     66 lpshut:=	LDLIBS += $(LIBMSG) $(LIBOAM) $(LIBLP)
     67 lpusers:=	LDLIBS += $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBUSR) $(LIBLP)
     68 
     69 .KEEP_STATE:
     70 
     71 all:		$(PROG) $(SUBDIRS)
     72 
     73 install:	$(PROG) $(ROOTLIBLPLOCLPROG) $(ROOTSBINPROG) \
     74 		$(ROOTSYMLINKS) $(SUBDIRS) 
     75 
     76 catalog:	$(SUBDIRS) $(POFILE)
     77 		$(CP) $(POFILE) ..
     78 
     79 clean:		$(SUBDIRS)
     80 		$(RM) $(OBJS)
     81 
     82 clobber:	$(SUBDIRS) local_clobber
     83 
     84 local_clobber:
     85 		$(RM) $(OBJS) $(PROG) $(CLOBBERFILES)
     86 
     87 strip:		$(SUBDIRS)
     88 		$(STRIP) $(PROG)
     89 
     90 lint:
     91 		$(LINT.c) $(SRCS) $(LDLIBS)
     92 
     93 $(ROOTSYMLINKS):
     94 		$(RM) $@; $(SYMLINK) ../sbin/$(@F) $@
     95 
     96 $(SUBDIRS):	FRC
     97 		@cd $@; pwd; $(MAKE) $(TARGET)
     98 
     99 include		../Makefile.lp.msg
    100 
    101 FRC:
    102