summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPatrice Mandin <pmandin@caramail.com>2008-08-22 18:40:48 +0200
committerPatrice Mandin <pmandin@caramail.com>2008-08-22 18:40:48 +0200
commitb2ac9af464a5690761ac982eaa5082e09b4207e7 (patch)
tree28e51ccf7395d3efc0e434573c77b3813ae8e025 /Makefile
basic rewrite of nv30 demo
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..16b3771
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,33 @@
+SOURCES = main.c screen.c fifo.c object.c test_nops.c \
+ tcl_init.c tcl_triangle.c
+HEADERS = screen.h fifo.h object.h test_nops.h \
+ tcl_init.h tcl_triangle.h
+
+OBJECTS = $(SOURCES:%.c=%.o)
+
+LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
+LIBDRM_LIBS = $(shell pkg-config --libs libdrm)
+
+CFLAGS = $(LIBDRM_CFLAGS)
+LDFLAGS = $(LIBDRM_LIBS)
+
+PROGRAM = nv30_demo
+DEPEND_FILE = .depend
+
+all: $(PROGRAM)
+
+clean:
+ rm $(PROGRAM) $(OBJECTS) $(DEPEND_FILE)
+
+.c.o:
+ $(CC) $(CFLAGS) -c $< -o $@
+
+$(PROGRAM): $(OBJECTS)
+ $(CC) $(LDFLAGS) -o $@ $^
+
+depend: $(DEPEND_FILE)
+
+$(DEPEND_FILE): $(SOURCES)
+ $(CC) $(CFLAGS) -MM $^ > $@
+
+-include $(DEPEND_FILE)