2002-10-10 12:38:13 +05:30
|
|
|
# This file gets included into the main Makefile, in the top directory.
|
2002-10-09 02:47:06 +05:30
|
|
|
|
2002-10-14 00:52:26 +05:30
|
|
|
INSTALL += $(bin)ps $(man1)ps.1
|
2002-10-09 02:47:06 +05:30
|
|
|
|
2002-10-10 14:41:50 +05:30
|
|
|
# files to remove
|
|
|
|
CLEAN += ps/ps ps/debug
|
2002-10-10 12:38:13 +05:30
|
|
|
|
|
|
|
# a directory for cleaning
|
2002-10-10 15:50:13 +05:30
|
|
|
DIRS += ps/
|
2002-10-10 12:38:13 +05:30
|
|
|
|
|
|
|
# a file to create
|
|
|
|
ALL += ps/ps
|
2002-10-09 02:47:06 +05:30
|
|
|
|
2002-12-21 11:52:00 +05:30
|
|
|
PS_C := display global help output parser select sortformat
|
2002-10-11 04:10:35 +05:30
|
|
|
PSNAMES := $(addprefix ps/,$(PS_C))
|
2002-10-10 14:41:50 +05:30
|
|
|
PSOBJ := $(addsuffix .o,$(PSNAMES))
|
|
|
|
PSSRC := $(addsuffix .c,$(PSNAMES))
|
2002-10-09 02:47:06 +05:30
|
|
|
|
2002-10-21 14:47:39 +05:30
|
|
|
PS_X := COPYING HACKING TRANSLATION common.h module.mk it p ps.1 regression
|
2002-10-11 04:10:35 +05:30
|
|
|
TARFILES += $(PSSRC) $(addprefix ps/,$(PS_X))
|
|
|
|
|
2002-10-10 14:41:50 +05:30
|
|
|
ps/ps: $(PSOBJ) $(LIBPROC)
|
|
|
|
$(CC) $(LDFLAGS) -o $@ $^
|
2002-10-09 02:47:06 +05:30
|
|
|
|
2002-10-10 14:41:50 +05:30
|
|
|
# This just adds the stacktrace code
|
|
|
|
ps/debug: $(PSOBJ) stacktrace.o $(LIBPROC)
|
|
|
|
$(CC) -o $@ $^ -lefence
|
2002-10-09 02:47:06 +05:30
|
|
|
|
2002-10-11 04:10:35 +05:30
|
|
|
$(PSOBJ): %.o: %.c ps/common.h proc/$(SONAME)
|
2002-10-10 15:50:13 +05:30
|
|
|
$(CC) -c $(CFLAGS) $< -o $@
|
2002-10-09 02:47:06 +05:30
|
|
|
|
2002-10-10 14:41:50 +05:30
|
|
|
ps/stacktrace.o: ps/stacktrace.c
|
2002-10-09 02:47:06 +05:30
|
|
|
|
|
|
|
|
2002-10-10 14:41:50 +05:30
|
|
|
$(bin)ps: ps/ps
|
|
|
|
install --mode a=rx --strip $< $@
|
2002-10-09 02:47:06 +05:30
|
|
|
|
2002-10-10 14:41:50 +05:30
|
|
|
$(man1)ps.1 : ps/ps.1
|
|
|
|
install --mode a=r $< $@
|
2002-10-09 02:47:06 +05:30
|
|
|
-rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz
|