summaryrefslogtreecommitdiffstats
path: root/ddcprobe/Makefile
blob: 5c3cd133ff58331ca3b54388771d842d7123042a (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 -O2 -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-lib: $(prefix)/include/vbe.h $(prefix)/lib/libvbe.a

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

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

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

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

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