summaryrefslogtreecommitdiff
path: root/libdrm/Makefile
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2005-01-16 23:50:58 +0000
committerAdam Jackson <ajax@nwnk.net>2005-01-16 23:50:58 +0000
commite5cc0b8f6f561b6eab91ab653cdce38dc160398f (patch)
tree795a70502c80ec4d991272d7214c077b0d5f8aac /libdrm/Makefile
parent37318f167511248315675ac45ba7d4c8fc4efcfc (diff)
Shared libdrm work:
- create libdrm.so target - build it by default - drop xf86drmCompat.c from the build - make 'clean' target never fail - use pattern rules for .c -> .o for parallelism - add 'install' target
Diffstat (limited to 'libdrm/Makefile')
-rw-r--r--libdrm/Makefile20
1 files changed, 15 insertions, 5 deletions
diff --git a/libdrm/Makefile b/libdrm/Makefile
index 8a7ece8b..a8122ff3 100644
--- a/libdrm/Makefile
+++ b/libdrm/Makefile
@@ -1,12 +1,22 @@
-SOURCES = xf86drm.c xf86drmCompat.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c
-OBJECTS = xf86drm.o xf86drmCompat.o xf86drmHash.o xf86drmRandom.o xf86drmSL.o
+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 $@
-$(OBJECTS): $(SOURCES)
- $(CC) $(CFLAGS) -c -I../shared -I../linux $+
+libdrm.so: $(OBJECTS)
+ $(CC) -shared -Wl,-hlibdrm.so.1 -o $@ $^
+
+.c.o:
+ $(CC) $(CFLAGS) -c -I../shared -I../linux $<
clean:
- rm *.a *.o
+ rm -f *.a *.o *.so
+
+install: libdrm.so
+ install -m 755 libdrm.so /lib