sct

set color temperature
git clone anongit@rnpnr.xyz:sct.git
Log | Files | Refs | Feed | README | LICENSE

Makefile (768B)


      1 .POSIX:
      2 
      3 VERSION = 1.9
      4 PREFIX = /usr/local
      5 MANPREFIX = ${PREFIX}/share/man
      6 
      7 CFLAGS = -Wall -Wextra -pedantic -std=c99 -O2 -I/usr/X11R6/include
      8 CPPFLAGS = -DVERSION=\"${VERSION}\"
      9 LDFLAGS = -lX11 -lXrandr -lm -L/usr/X11R6/lib -s
     10 
     11 all: sct
     12 
     13 .c.o:
     14 	$(CC) -o $@ -c $< $(CFLAGS) $(CPPFLAGS)
     15 
     16 .o:
     17 	$(CC) -o $@ $< $(LDFLAGS)
     18 
     19 install: all
     20 	# installing executable
     21 	mkdir -p "$(DESTDIR)$(PREFIX)/bin"
     22 	cp -f sct "$(DESTDIR)$(PREFIX)/bin"
     23 	chmod 755 "$(DESTDIR)$(PREFIX)/bin/sct"
     24 	# installing manual page
     25 	mkdir -p "$(DESTDIR)$(MANPREFIX)/man1"
     26 	sed "s:VERSION:$(VERSION):g" < sct.1 > "$(DESTDIR)$(MANPREFIX)/man1/sct.1"
     27 
     28 uninstall:
     29 	rm -f "$(DESTDIR)$(PREFIX)/bin/sct"
     30 	rm -f "$(DESTDIR)$(MANPREFIX)/man1/sct.1"
     31 
     32 clean:
     33 	rm -f sct $(OBJ)
     34 
     35 .PHONY: all clean install uninstall