diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-11-03 20:31:18 -0700 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2012-11-03 20:31:18 -0700 |
commit | b138da4a4b9d57b850ca4d0061969f5e3299861d (patch) | |
tree | 3e20a6f4a29bfe91b2b51f416673d9fad1e0b7c7 /progs/Makefile | |
download | libcap-b138da4a4b9d57b850ca4d0061969f5e3299861d.tar.gz libcap-b138da4a4b9d57b850ca4d0061969f5e3299861d.tar.bz2 libcap-b138da4a4b9d57b850ca4d0061969f5e3299861d.zip |
Imported Upstream version 2.22upstream/2.22
Diffstat (limited to 'progs/Makefile')
-rw-r--r-- | progs/Makefile | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/progs/Makefile b/progs/Makefile new file mode 100644 index 0000000..ef51dc6 --- /dev/null +++ b/progs/Makefile @@ -0,0 +1,38 @@ + +topdir=$(shell pwd)/.. +include $(topdir)/Make.Rules +# +# Programs: all of the examples that we will compile +# +PROGS=getpcaps capsh +ifeq ($(LIBATTR),yes) +PROGS += getcap setcap +endif + +BUILD=$(PROGS) + +ifneq ($(DYNAMIC),yes) +LDFLAGS += --static +endif +LDLIBS += -L../libcap -lcap + +all: $(BUILD) + +$(BUILD): %: %.o + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS) + +%.o: %.c $(INCS) + $(CC) $(IPATH) $(CFLAGS) -c $< -o $@ + +install: all + mkdir -p -m 0755 $(SBINDIR) + for p in $(PROGS) ; do \ + install -m 0755 $$p $(SBINDIR) ; \ + done +ifeq ($(RAISE_SETFCAP),yes) + $(SBINDIR)/setcap cap_setfcap=i $(SBINDIR)/setcap +endif + +clean: + $(LOCALCLEAN) + rm -f *.o $(BUILD) tcapsh ping hack.sh |