Makefile revision b663292ae940e76e7d8f3f6d2a895fa51564539f
1# progs/gallium/simple/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 14ifeq ($(MESA_LLVM),1) 15LINKS = $(TOP)/src/gallium/drivers/llvmpipe/libllvmpipe.a 16LDFLAGS += $(LLVM_LDFLAGS) 17endif 18 19LINKS += \ 20 $(TOP)/src/gallium/drivers/rbug/librbug.a \ 21 $(TOP)/src/gallium/drivers/trace/libtrace.a \ 22 $(TOP)/src/gallium/drivers/galahad/libgalahad.a \ 23 $(TOP)/src/gallium/winsys/sw/null/libws_null.a \ 24 $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \ 25 $(GALLIUM_AUXILIARIES) \ 26 $(PROG_LINKS) 27 28SOURCES = \ 29 tri.c \ 30 quad-tex.c 31 32OBJECTS = $(SOURCES:.c=.o) 33 34PROGS = $(OBJECTS:.o=) 35 36PROG_DEFINES = \ 37 -DGALLIUM_SOFTPIPE -DGALLIUM_RBUG -DGALLIUM_TRACE -DGALLIUM_GALAHAD 38 39##### TARGETS ##### 40 41default: $(PROGS) 42 43clean: 44 -rm -f $(PROGS) 45 -rm -f *.o 46 -rm -f result.bmp 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