1 # CDDL HEADER START 2 # 3 # The contents of this file are subject to the terms of the 4 # Common Development and Distribution License (the "License"). 5 # You may not use this file except in compliance with the License. 6 # 7 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 8 # or http://www.opensolaris.org/os/licensing. 9 # See the License for the specific language governing permissions 10 # and limitations under the License. 11 # 12 # When distributing Covered Code, include this CDDL HEADER in each 13 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 14 # If applicable, add the following below this CDDL HEADER, with the 15 # fields enclosed by brackets "[]" replaced with your own identifying 16 # information: Portions Copyright [yyyy] [name of copyright owner] 17 # 18 # CDDL HEADER END 19 # 20 # 21 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 22 # Use is subject to license terms. 23 # 24 # 25 26 DYNPROG = sndrd sndradm sndrboot sndrsyncd 27 28 include ../../Makefile.cmd 29 include ../Makefile.com 30 31 PROG = $(DYNPROG) 32 33 SUBDIRS= etc 34 35 sndradm := POBJS = sndradm.o rdc_ioctl.o sndrsubr.o 36 sndrboot := POBJS = sndrboot.o rdc_ioctl.o sndrsubr.o 37 sndrd := POBJS = sndrd.o 38 sndrsyncd := POBJS = sndrsyncd.o rdc_ioctl.o sndrsubr.o 39 40 OBJS= \ 41 sndrboot.o \ 42 sndradm.o \ 43 sndrd.o \ 44 sndrsyncd.o \ 45 rdc_ioctl.o \ 46 sndrsubr.o 47 48 XTRA_OBJS= \ 49 sdbc_ioctl.o 50 51 SRCS= $(OBJS:%.o=%.c) ../sdbc/sdbc_ioctl.c 52 53 sndradm := LDLIBS += -lrdc -lunistat -ldscfg -lnsctl -lnsl 54 sndrboot := LDLIBS += -lrdc -lunistat -ldscfg 55 sndrd := LDLIBS += -lrdc -lnsl 56 sndrsyncd := LDLIBS += -lrdc -ldscfg -lunistat 57 58 CFLAGS += $(CCVERBOSE) -D_RDC_ -D_SYSCALL32 59 LINTFLAGS += -Xa -n -s -x -m -u -Dlint -errhdr=%user -D_RDC_ -D_SYSCALL32 60 LINTFLAGS += -DDEBUG 61 LINTFLAGS += -erroff=E_SEC_SPRINTF_UNBOUNDED_COPY 62 LINTFLAGS += -erroff=E_SEC_SCANF_UNBOUNDED_COPY 63 LINTFLAGS += -erroff=E_SEC_PRINTF_VAR_FMT 64 LINTFLAGS += -erroff=E_FUNC_SET_NOT_USED 65 CERRWARN += -_gcc=-Wno-unused-label 66 CERRWARN += -_gcc=-Wno-parentheses 67 CERRWARN += -_gcc=-Wno-uninitialized 68 POFILE = rdc_all.po 69 POFILES = sndradm.po sndrboot.po 70 ROOTLIBLINKS = $(ROOTLIB)/sndrd $(ROOTLIB)/sndrsyncd 71 ROOTUSRSBINLINKS = $(ROOTUSRSBIN)/sndradm $(ROOTUSRSBIN)/sndrboot 72 73 all := TARGET= all 74 install := TARGET= install 75 clean := TARGET= clean 76 clobber := TARGET= clobber 77 lint := TARGET= lint 78 79 .KEEP_STATE: 80 81 .PARALLEL: $(OBJS) $(XTRA_OBJS) 82 83 all: $(SUBDIRS) $(PROG) $(POFILES) 84 85 install: $(SUBDIRS) all $(ROOTPROG) $(ROOTLIBLINKS) $(ROOTUSRSBINLINKS) 86 87 lint: $(SUBDIRS) lint_SRCS 88 89 clean: $(SUBDIRS) 90 $(RM) *.o $(POFILES) 91 92 $(PROG): $$(POBJS) 93 $(LINK.c) $(POBJS) -o $@ $(LDLIBS) 94 $(POST_PROCESS) 95 96 $(POFILE): $(POFILES) 97 $(RM) $@ 98 $(CAT) $(POFILES) > $@ 99 100 sdbc_ioctl.o: ../sdbc/sdbc_ioctl.c 101 $(COMPILE.c) ../sdbc/sdbc_ioctl.c 102 103 $(SUBDIRS): FRC 104 @cd $@; pwd; $(MAKE) $(TARGET) 105 106 $(ROOTLIBLINKS): $(ROOTLIB) $(ROOTPROG) 107 -$(RM) $(ROOTLIBLINKS); 108 $(LN) $(ROOTBIN)/sndrd $(ROOTLIB)/sndrd; 109 $(LN) $(ROOTBIN)/sndrsyncd $(ROOTLIB)/sndrsyncd 110 111 $(ROOTUSRSBINLINKS): $(ROOTUSRSBIN) $(ROOTPROG) 112 -$(RM) $(ROOTUSRSBINLINKS); 113 $(LN) $(ROOTBIN)/sndradm $(ROOTUSRSBIN)/sndradm; 114 $(LN) $(ROOTBIN)/sndrboot $(ROOTUSRSBIN)/sndrboot 115 116 FRC: 117 118 include ../../Makefile.targ