summaryrefslogtreecommitdiffstats
path: root/ddcprobe/Makefile
blob: 728c17ceb1b3ad948c106f51efa7907525339853 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
CFLAGS=-Wall -O -g# -DDEBUG

TARGETS=ddcprobe svgamodes ddcxinfo modetest libvbe.a

ifeq (.depend,$(wildcard .depend))
TARGET=all
else
TARGET=depend all
endif

everything: $(TARGET)

all: $(TARGETS)

install: $(TARGETS)
	cp -a ddcprobe $(DESTDIR)/usr/sbin/ddcprobe

ddcprobe: lrmi.o vesamode.o vbe.o ddcprobe.o

svgamodes: lrmi.o vesamode.o vbe.o svgamodes.o

ddcxinfo: lrmi.o vesamode.o vbe.o ddcxinfo.o

modetest: lrmi.o vesamode.o vbe.o modetest.o

libvbe.a: lrmi.o vesamode.o vbe.o
	$(AR) cru $@ $^

#install: $(DESTDIR)/usr/include/vbe.h $(DESTDIR)/usr/lib/libvbe.a

$(DESTDIR)/usr/include/vbe.h:
	install -m 644 vbe.h $(DESTDIR)/usr/include/vbe.h

$(DESTDIR)/usr/lib/libvbe.a:
	install -m 644 libvbe.a $(DESTDIR)/usr/lib/libvbe.a

clean:
	$(RM) $(TARGETS) *.o core

depend:
	$(CPP) -M $(CFLAGS) *.c > .depend

ifeq (.depend,$(wildcard .depend))
include .depend
endif