aboutsummaryrefslogblamecommitdiffstats
path: root/Makefile
blob: 0dc11a2d0def132989e735fb05d6e15d355a402e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
       
 

                      
 





                      
 
              
 

                         
 

                                     
 

                                               
 




                                                             
 
          

                                                      
 
      



                                     
 
                                   
.POSIX:

CONFIGFILE = config.mk
include $(CONFIGFILE)

OBJ =\
	calibrator.o\
	drmgamma.o\
	framebuffer.o\
	gamma.o\
	state.o

HDR = common.h

all: crt-calibrator
$(OBJ): $(@:.o=.c) $(HDR)

crt-calibrator: $(OBJ)
	$(CC) -o $@ $(OBJ) $(LDFLAGS)

.c.o:
	$(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)

install: crt-calibrator
	mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
	mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1"
	cp -- crt-calibrator "$(DESTDIR)$(PREFIX)/bin/"
	cp -- crt-calibrator.1 "$(DESTDIR)$(MANPREFIX)/man1/"

uninstall:
	-rm -- "$(DESTDIR)$(BINDIR)/crt-calibrator"
	-rm -- "$(DESTDIR)$(MAN1DIR)/crt-calibrator.1"

clean:
	-rm -rf -- crt-calibrator *.o

.SUFFIXES:
.SUFFIXES: .o .c

.PHONY: all install uninstall clean