Print this page
@@ -20,17 +20,14 @@
#
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
-# Copyright 2015 Joyent, Inc.
#
PROG:sh = basename `cd ..; pwd`
-include ../../../Makefile.ctf
-
OBJS = $(PROG).o
SRCS = ../$(PROG).c
FILEMODE = 0555
@@ -112,41 +109,41 @@
OBJS_pwait = $(COBJS)
CPPFLAGS_pwdx = $(CINC)
OBJS_pwdx = $(COBJS)
-LN_pargs = penv pauxv
-
CPPFLAGS += $(CPPFLAGS_$(PROG))
OBJS += $(OBJS_$(PROG))
SRCS += $(SRCS_$(PROG))
+# For lint, always include ptools_common.c, but suppress the "defined but
+# not used" error, in case a given ptool doesn't need it.
+SRCS += ../../common/ptools_common.c
+LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
+LINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2
+
INSTALL_NEW=
INSTALL_LEGACY=$(RM) $(ROOTPROCBINSYMLINK) ; \
$(LN) -s ../../bin/$(PROG) $(ROOTPROCBINSYMLINK)
.KEEP_STATE:
elfcap.o: $(ELFCAP)/elfcap.c
$(COMPILE.c) -o $@ $(ELFCAP)/elfcap.c
- $(POST_PROCESS_O)
pmap_common.o: $(PMAP)/pmap_common.c
$(COMPILE.c) -o $@ $(PMAP)/pmap_common.c
- $(POST_PROCESS_O)
%.o: ../%.c
$(COMPILE.c) $<
- $(POST_PROCESS_O)
%.o: ../../common/%.c
$(COMPILE.c) $<
$(POST_PROCESS_O)
-all: $(PROG) $(LN_$(PROG))
+all: $(PROG)
-ROOTBINLN=$(LN_$(PROG):%=$(ROOTBIN)/%)
ROOTBINPROG=$(ROOTBIN)/$(PROG)
ROOTPROCBINSYMLINK=$(ROOT)/usr/proc/bin/$(PROG)
$(PROG): $$(OBJS)
$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
@@ -154,27 +151,15 @@
#
# Install the ptool, symlinking it into /usr/proc/bin if PTOOL_TYPE is set
# to LEGACY.
#
-install: all $(ROOTISAPROG) $(ROOTISALN)
+install: all $(ROOTISAPROG)
-$(RM) $(ROOTBINPROG)
-$(LN) $(ISAEXEC) $(ROOTBINPROG)
-$(INSTALL_$(PTOOL_TYPE))
-$(ROOTBINLN):
- -$(RM) $@
- -$(LN) $(ISAEXEC) $@
-
-$(ROOTISALN): $(ROOTISAPROG)
- -$(RM) $@
- -$(LN) $(ROOTISAPROG) $@
-
-$(LN_$(PROG)): $(PROG)
- -$(RM) $@
- -$(LN) $(PROG) $@
-
clean:
$(RM) $(OBJS)
lint:
$(LINT.c) $(SRCS) $(LDLIBS)