1 # This file gets included into the main Makefile, in the top directory.
3 INSTALL += $(bin)ps $(man1)ps.1
6 CLEAN += ps/ps ps/debug
8 # a directory for cleaning
14 PS_C := display global help output parser select sortformat
15 PSNAMES := $(addprefix ps/,$(PS_C))
16 PSOBJ := $(addsuffix .o,$(PSNAMES))
17 PSSRC := $(addsuffix .c,$(PSNAMES))
19 PS_X := COPYING HACKING TRANSLATION common.h module.mk it p ps.1 regression
20 TARFILES += $(PSSRC) $(addprefix ps/,$(PS_X))
22 ps/ps: $(PSOBJ) $(LIBPROC)
23 $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $^ $(ldl)
25 # This just adds the stacktrace code
26 ps/debug: $(PSOBJ) stacktrace.o $(LIBPROC)
27 $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $^ -lefence $(ldl)
29 $(PSOBJ): %.o: %.c ps/common.h $(LIBPROC)
30 $(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) $< -o $@
32 ps/stacktrace.o: ps/stacktrace.c
36 $(install) --mode a=rx $< $@
39 $(install) --mode a=r $< $@
40 -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz