[download]

local/src/dragon/Makefile

   1 PREFIX = $(HOME)/.local
   2 MANPREFIX = $(PREFIX)/share/man
   3 NAME = dragon
   4 
   5 all: $(NAME)
   6 
   7 $(NAME): dragon.c
   8 	$(CC) --std=c99 -Wall $(DEFINES) dragon.c -o $(NAME) `pkg-config --cflags gtk+-3.0` `pkg-config --libs gtk+-3.0`
   9 
  10 install: $(NAME)
  11 	mkdir -p $(DESTDIR)$(PREFIX)/bin
  12 	cp -f $(NAME) $(DESTDIR)$(PREFIX)/bin
  13 	chmod 755 $(DESTDIR)$(PREFIX)/bin/$(NAME)
  14 	mkdir -p $(DESTDIR)$(MANPREFIX)/man1
  15 	sed -e "s/dragon/$(NAME)/g" dragon.1 > $(DESTDIR)$(MANPREFIX)/man1/$(NAME).1
  16 	chmod 644 $(DESTDIR)$(MANPREFIX)/man1/$(NAME).1
  17 
  18 uninstall:
  19 	rm -f $(DESTDIR)$(PREFIX)/bin/$(NAME) $(DESTDIR)$(MANPREFIX)/man1/$(NAME).1