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 29
|
CC:=gcc
CP:=cp
CFLAGS:=-Os -ggdb -Wall -W -Wcast-qual -Wcast-align -Wbad-function-cast -Wshadow -Wwrite-strings -Wnested-externs -Winline -Wredundant-decls -Waggregate-return -Wformat=2 -Wpointer-arith -Wconversion -Wmissing-declarations -Wmissing-prototypes
# -Wunreachable-code -Wdisabled-optimization
DESTDIR:=
LDFLAGS:=
MANDIR:=/usr/share/man/man1
#MKDIR:=mkdir -p
INSTALL:=install
PROG:=paxctl
RM:=rm
all: $(PROG)
$(PROG): $(PROG).o
$(CC) $(LDFLAGS) -o $@ $<
$(PROG).o: $(PROG).c $(PROG).h
$(CC) -c $(CFLAGS) -o $@ $<
install: $(PROG)
# $(MKDIR) $(DESTDIR)/sbin $(DESTDIR)$(MANDIR)
# $(CP) $(PROG) $(DESTDIR)/sbin
# $(CP) $(PROG).1 $(DESTDIR)$(MANDIR)
$(INSTALL) -D --owner 0 --group 0 --mode a=rx $(PROG) $(DESTDIR)/sbin/$(PROG)
$(INSTALL) -D --owner 0 --group 0 --mode a=r $(PROG).1 $(DESTDIR)/$(MANDIR)/$(PROG).1
clean:
$(RM) -f $(PROG) $(PROG).o core
|