summaryrefslogtreecommitdiff
path: root/Makefile
blob: f69be8d2d33028b4d93af126bbf4355343925f59 (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
CC = gcc
CFLAGS = -O2 -Wall -W
CFLAGS += `pkg-config --cflags libdrm`
LDFLAGS = `pkg-config --libs libdrm`
PROGRAM = drm_master_util
INSTALL = /usr/bin/install
PREFIX	= /usr

all: $(PROGRAM)

$(PROGRAM): drm_master_util.o
	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)

install: $(PROGRAM)
	$(INSTALL) $(PROGRAM) $(PREFIX)/bin
	chmod u+s $(PREFIX)/bin/${PROGRAM}

clean:
	rm -f *.o $(PROGRAM)

distclean: clean

%.o: %.c
	$(CC) $(CFLAGS) -c $^ -I. -o $@

.PHONY: all install clean distclean