ctemp

Set color temperature
git clone git://git.akobets.xyz/ctemp
Log | Files | Refs | README | LICENSE

Makefile (882B)


      1 # ctemp - set color temperature
      2 # See LICENSE file for copyright and license details.
      3 .POSIX:
      4 
      5 include config.mk
      6 
      7 SRC = colors.c ctemp.c
      8 OBJ = $(SRC:.c=.o)
      9 
     10 all: ctemp
     11 
     12 .c.o:
     13 	$(CC) -o $@ -c $< $(ALL_CFLAGS) $(ALL_CPPFLAGS)
     14 
     15 ctemp.o: arg.h
     16 
     17 $(OBJ): config.mk
     18 
     19 ctemp: $(OBJ)
     20 	$(CC) -o $@ $(OBJ) $(ALL_LDFLAGS)
     21 
     22 clean:
     23 	rm -f ctemp $(OBJ)
     24 
     25 dist: clean
     26 	mkdir -p ctemp-$(VERSION)
     27 	cp -R LICENSE README Makefile config.mk ctemp.1 \
     28 		arg.h $(SRC) ctemp-$(VERSION)
     29 	tar -cf - ctemp-$(VERSION) | gzip > ctemp-$(VERSION).tar.gz
     30 	rm -rf ctemp-$(VERSION)
     31 
     32 install: ctemp
     33 	mkdir -p $(DESTDIR)$(PREFIX)/bin
     34 	cp -f ctemp $(DESTDIR)$(PREFIX)/bin
     35 	chmod 755 $(DESTDIR)$(PREFIX)/bin/ctemp
     36 	mkdir -p $(DESTDIR)$(MANPREFIX)/man1
     37 	sed "s/VERSION/$(VERSION)/g" < ctemp.1 > $(DESTDIR)$(MANPREFIX)/man1/ctemp.1
     38 
     39 uninstall:
     40 	rm -f $(DESTDIR)$(PREFIX)/bin/ctemp
     41 	rm -f $(DESTDIR)$(MANPREFIX)/man1/ctemp.1