summaryrefslogtreecommitdiff
path: root/progs/Makefile
blob: 4caf90c719ca58beec8b9f77244847496eb84424 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

topdir=$(shell pwd)/..
include $(topdir)/Make.Rules
#
# Programs: all of the examples that we will compile
#
PROGS=getpcaps setpcaps execcap sucap

# when we have filecaps...
#PROGS+=getcap setcap

all: $(PROGS)

$(PROGS): %: %.o
	$(CC) $(COPTFLAG) $(LDFLAGS) -o $@ $< $(LIBS)

%.o: %.c $(INCS)
	$(CC) $(CFLAGS) -c $< -o $@

install: all
	mkdir -p -m 0755 $(SBINDIR)
	for p in $(PROGS) ; do \
		install -s -m 0755 $$p $(SBINDIR) ; \
	done

clean:
	$(LOCALCLEAN)
	rm -f *.o $(PROGS)