sacc

sacc(omys), simple console gopher client (mirror)
git clone https://git.parazyd.org/sacc
Log | Files | Refs | LICENSE

Makefile (765B)


      1 # sacc: saccomys gopher client
      2 # See LICENSE file for copyright and license details.
      3 .POSIX:
      4 
      5 include config.mk
      6 
      7 BIN = sacc
      8 MAN = $(BIN).1
      9 OBJ = $(BIN:=.o) ui_$(UI).o
     10 
     11 all: $(BIN)
     12 
     13 config.h:
     14 	cp config.def.h config.h
     15 
     16 $(BIN): $(OBJ)
     17 	$(CC) $(OBJ) $(LDFLAGS) $(LIBS) -o $@
     18 
     19 $(OBJ): config.h config.mk common.h
     20 
     21 clean:
     22 	rm -f $(BIN) $(OBJ)
     23 
     24 install: $(BIN)
     25 	mkdir -p $(DESTDIR)$(PREFIX)/bin/
     26 	cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin/
     27 	chmod 555 $(DESTDIR)$(PREFIX)/bin/$(BIN)
     28 	mkdir -p $(DESTDIR)$(MANDIR)
     29 	cp -f $(MAN) $(DESTDIR)$(MANDIR)
     30 
     31 uninstall:
     32 	rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN) $(DESTDIR)$(MANDIR)/$(MAN)
     33 
     34 # Stock FLAGS
     35 SACCCFLAGS = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_GNU_SOURCE \
     36              $(CFLAGS)
     37 
     38 .c.o:
     39 	$(CC) $(SACCCFLAGS) -c $<