Makefile (854B)
1 include config.mk 2 3 DISTFILES = \ 4 Makefile \ 5 atomicio.c \ 6 atomicio.h \ 7 config.mk \ 8 openbsd-nc.1 \ 9 openbsd-nc.c \ 10 pledge.c \ 11 socks.c \ 12 utils.h 13 14 OBJ = \ 15 atomicio.o \ 16 openbsd-nc.o \ 17 pledge.o \ 18 socks.o 19 20 BIN = openbsd-nc 21 22 all: $(BIN) 23 24 $(BIN): $(OBJ) 25 $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(OBJ) $(LDLIBS) 26 27 $(OBJ): atomicio.h utils.h 28 29 install: all 30 mkdir -p $(DESTDIR)$(PREFIX)/bin 31 cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin 32 mkdir -p $(DESTDIR)$(MANPREFIX)/man1 33 cp -f $(BIN).1 $(DESTDIR)$(MANPREFIX)/man1 34 35 uninstall: 36 rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) 37 rm -f $(DESTDIR)$(MANPREFIX)/man8/$(BIN).1 38 39 dist: 40 mkdir -p openbsd-nc-$(VERSION) 41 cp $(DISTFILES) openbsd-nc-$(VERSION) 42 tar -cf openbsd-nc-$(VERSION).tar openbsd-nc-$(VERSION) 43 gzip openbsd-nc-$(VERSION).tar 44 rm -rf openbsd-nc-$(VERSION) 45 46 clean: 47 rm -f $(BIN) $(OBJ) openbsd-nc-$(VERSION).tar.gz