diff options
author | Avik Sil <avik.sil@linaro.org> | 2011-06-16 12:13:28 +0530 |
---|---|---|
committer | Avik Sil <avik.sil@linaro.org> | 2011-06-16 12:13:28 +0530 |
commit | a36795846bf0de4ec0d7344b2f41c94b7317bb42 (patch) | |
tree | b70243cbb1aa27e6efa2601f556c33f1e40bb6e4 /smartt-top/ps/module.mk |
Diffstat (limited to 'smartt-top/ps/module.mk')
-rwxr-xr-x | smartt-top/ps/module.mk | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/smartt-top/ps/module.mk b/smartt-top/ps/module.mk new file mode 100755 index 0000000..2902a3a --- /dev/null +++ b/smartt-top/ps/module.mk @@ -0,0 +1,40 @@ +# This file gets included into the main Makefile, in the top directory. + +INSTALL += $(bin)ps $(man1)ps.1 + +# files to remove +CLEAN += ps/ps ps/debug + +# a directory for cleaning +DIRS += ps/ + +# a file to create +ALL += ps/ps + +PS_C := display global help output parser select sortformat +PSNAMES := $(addprefix ps/,$(PS_C)) +PSOBJ := $(addsuffix .o,$(PSNAMES)) +PSSRC := $(addsuffix .c,$(PSNAMES)) + +PS_X := COPYING HACKING TRANSLATION common.h module.mk it p ps.1 regression +TARFILES += $(PSSRC) $(addprefix ps/,$(PS_X)) + +ps/ps: $(PSOBJ) $(LIBPROC) + $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $^ $(ldl) + +# This just adds the stacktrace code +ps/debug: $(PSOBJ) stacktrace.o $(LIBPROC) + $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $^ -lefence $(ldl) + +$(PSOBJ): %.o: %.c ps/common.h $(LIBPROC) + $(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) $< -o $@ + +ps/stacktrace.o: ps/stacktrace.c + + +$(bin)ps: ps/ps + $(install) --mode a=rx $< $@ + +$(man1)ps.1 : ps/ps.1 + $(install) --mode a=r $< $@ + -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz |