procps/ps/module.mk

41 lines
968 B
Makefile
Raw Normal View History

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