SOURCES = main.c screen.c fifo.c object.c test_nops.c \ tcl_init.c tcl_triangle.c imageblit.c context_surface_2d.c \ clip_rectangle.c image_pattern.c raster_op.c HEADERS = screen.h fifo.h object.h test_nops.h \ tcl_init.h tcl_triangle.h imageblit.h context_surface_2d.h \ clip_rectangle.h image_pattern.h raster_op.h nv30_fpinst.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)