summaryrefslogtreecommitdiff
path: root/libdrm/Makefile
blob: 58759af26b5d5a5e8c2f52462be5c17af1da052e (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
SOURCES = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c
OBJECTS = xf86drm.o xf86drmHash.o xf86drmRandom.o xf86drmSL.o

CFLAGS ?= -O2 -fPIC -g

all: libdrm.so

libxf86drm.a:	$(OBJECTS)	
	ar rc $@ $+
	ranlib $@

libdrm.so: $(OBJECTS)
	$(CC) -shared -Wl,-hlibdrm.so.1 -o $@ $^

.c.o:
	$(CC) $(CFLAGS) -c -I../shared -I../linux $<

clean:
	rm -f *.a *.o *.so

install: libdrm.so xf86drm.h ../shared-core/drm.h
	install -m 755 libdrm.so /lib
	install -m 644 xf86drm.h /usr/include
	install -m 644 ../shared-core/drm.h /usr/include