Updated with Tizen:Base source codes
[external/procps.git] / ps / module.mk
1 # This file gets included into the main Makefile, in the top directory.
2
3 INSTALL += $(bin)ps $(man1)ps.1
4
5 # files to remove
6 CLEAN += ps/ps ps/debug
7
8 # a directory for cleaning
9 DIRS += ps/
10
11 # a file to create
12 ALL += ps/ps
13
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))
18
19 PS_X := COPYING HACKING TRANSLATION common.h module.mk it p ps.1 regression
20 TARFILES += $(PSSRC) $(addprefix ps/,$(PS_X))
21
22 ps/ps: $(PSOBJ) $(LIBPROC)
23         $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $^ $(ldl)
24
25 # This just adds the stacktrace code
26 ps/debug: $(PSOBJ) stacktrace.o $(LIBPROC)
27         $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $^ -lefence $(ldl)
28
29 $(PSOBJ): %.o: %.c ps/common.h $(LIBPROC)
30         $(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) $< -o $@
31
32 ps/stacktrace.o: ps/stacktrace.c
33
34
35 $(bin)ps: ps/ps
36         $(install) --mode a=rx $< $@
37
38 $(man1)ps.1 : ps/ps.1
39         $(install) --mode a=r $< $@
40         -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz