div

X11 image viewer
git clone https://git.porkepik.fr/div
Log | Files | Refs | README | LICENSE

Makefile (507B)


      1 .POSIX:
      2 PREFIX = /usr/local
      3 CFLAGS = -O2 -std=c99 -Wall -Wextra -I/usr/X11R6/include
      4 LDFLAGS = -L/usr/X11R6/lib
      5 LDLIBS = -lX11 -lm
      6 SRC = div.c
      7 BIN = div
      8 
      9 ifdef DEBUG
     10 	CFLAGS += -g -Og -fsanitize=address
     11 	LDFLAGS += -fsanitize=address
     12 endif
     13 
     14 $(BIN): $(SRC)
     15 	$(CC) $(CFLAGS) $(SRC) -o $(BIN) $(LDFLAGS) $(LDLIBS)
     16 
     17 clean:
     18 	rm -f $(BIN)
     19 
     20 install:
     21 	mkdir -p $(DESTDIR)$(PREFIX)/bin
     22 	cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
     23 	chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN)
     24 
     25 uninstall:
     26 	rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)