git-restrict

simple utility for git repo permission management
git clone https://git.parazyd.org/git-restrict
Log | Files | Refs | README | LICENSE

Makefile (776B)


      1 .POSIX:
      2 
      3 # paths
      4 PREFIX = /usr/local
      5 MANPREFIX = ${PREFIX}/share/man
      6 
      7 # Use system flags
      8 GR_CFLAGS = $(CFLAGS) -Wall -Werror -pedantic -std=c99
      9 GR_CPPFLAGS = $(CPPFLAGS) -D_GNU_SOURCE
     10 GR_LDFLAGS = $(LDFLAGS) -static -s
     11 
     12 BIN = git-restrict
     13 MAN = $(BIN).1
     14 OBJ = $(BIN:=.o)
     15 
     16 all: $(BIN)
     17 
     18 .c.o:
     19 	$(CC) -c $(GR_CFLAGS) $(GR_CPPFLAGS) $<
     20 
     21 $(BIN): $(OBJ)
     22 	$(CC) $(OBJ) $(GR_LDFLAGS) -o $@
     23 
     24 clean:
     25 	rm -f $(BIN) $(OBJ)
     26 
     27 install: all
     28 	mkdir -p $(DESTDIR)$(PREFIX)/bin
     29 	mkdir -p $(DESTDIR)$(MANPREFIX)/man1
     30 	cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
     31 	cp -f $(MAN) $(DESTDIR)$(MANPREFIX)/man1
     32 	chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN)
     33 
     34 uninstall:
     35 	rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)
     36 	rm -f $(DESTDIR)$(MANPREFIX)/man1/$(MAN)
     37 
     38 test: all
     39 	@./test.sh
     40 
     41 .PHONY: all clean install uninstall test