1# src/gallium/tests/trivial/Makefile 2 3TOP = ../../../.. 4include $(TOP)/configs/current 5 6INCLUDES = \ 7 -I. \ 8 -I$(TOP)/src/gallium/include \ 9 -I$(TOP)/src/gallium/auxiliary \ 10 -I$(TOP)/src/gallium/drivers \ 11 -I$(TOP)/src/gallium/winsys \ 12 $(PROG_INCLUDES) 13 14LINKS += \ 15 $(GALLIUM_PIPE_LOADER_LIBS) \ 16 $(GALLIUM_AUXILIARIES) \ 17 $(PROG_LINKS) $(LIBUDEV_LIBS) 18 19SOURCES = \ 20 tri.c \ 21 quad-tex.c \ 22 compute.c 23 24OBJECTS = $(SOURCES:.c=.o) 25 26PROGS = $(OBJECTS:.o=) 27 28PROG_DEFINES = -DPIPE_SEARCH_DIR=\"$(PIPE_SRC_DIR)\" \ 29 $(GALLIUM_PIPE_LOADER_DEFINES) 30 31PIPE_SRC_DIR = $(TOP)/src/gallium/targets/pipe-loader 32 33##### TARGETS ##### 34 35default: $(PROGS) pipes 36 37install: 38 39clean: 40 -rm -f $(PROGS) 41 -rm -f *.o 42 -rm -f result.bmp 43 @$(MAKE) -C $(PIPE_SRC_DIR) clean 44 45pipes: 46 @$(MAKE) -C $(PIPE_SRC_DIR) 47 48##### RULES ##### 49 50$(OBJECTS): %.o: %.c 51 $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $(PROG_DEFINES) $< -o $@ 52 53$(PROGS): %: %.o $(LINKS) 54 $(CXX) $(LDFLAGS) $< $(LINKS) $(LLVM_LIBS) -lm -lpthread -ldl -o $@ 55