1 2topdir=$(shell pwd)/.. 3include $(topdir)/Make.Rules 4# 5# Programs: all of the examples that we will compile 6# 7PROGS=getpcaps capsh getcap setcap 8 9BUILD=$(PROGS) 10 11ifneq ($(DYNAMIC),yes) 12LDFLAGS += --static 13endif 14LDLIBS += -L../libcap -lcap 15 16all: $(BUILD) 17 18$(BUILD): %: %.o 19 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS) 20 21%.o: %.c $(INCS) 22 $(CC) $(IPATH) $(CFLAGS) -c $< -o $@ 23 24install: all 25 mkdir -p -m 0755 $(FAKEROOT)$(SBINDIR) 26 for p in $(PROGS) ; do \ 27 install -m 0755 $$p $(FAKEROOT)$(SBINDIR) ; \ 28 done 29ifeq ($(RAISE_SETFCAP),yes) 30 $(FAKEROOT)$(SBINDIR)/setcap cap_setfcap=i $(FAKEROOT)$(SBINDIR)/setcap 31endif 32 33clean: 34 $(LOCALCLEAN) 35 rm -f *.o $(BUILD) tcapsh ping hack.sh 36