git-restrict

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

Makefile (729B)


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