File: Makefile

package info (click to toggle)
paxctl 0.9-1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 108 kB
  • ctags: 84
  • sloc: ansic: 551; makefile: 37
file content (26 lines) | stat: -rw-r--r-- 808 bytes parent folder | download
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
CC:=gcc
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 $(PROG)-elf.c
	$(CC) -c $(CFLAGS) -o $@ $<

install: $(PROG)
#	$(MKDIR) $(DESTDIR)/sbin $(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