Home | History | Annotate | Download | only in trivial
      1 # src/gallium/tests/trivial/Makefile
      2 
      3 TOP = ../../../..
      4 include $(TOP)/configs/current
      5 
      6 INCLUDES = \
      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 
     14 LINKS += \
     15 	$(GALLIUM_PIPE_LOADER_LIBS) \
     16 	$(GALLIUM_AUXILIARIES) \
     17 	$(PROG_LINKS) $(LIBUDEV_LIBS)
     18 
     19 SOURCES = \
     20 	tri.c \
     21 	quad-tex.c \
     22 	compute.c
     23 
     24 OBJECTS = $(SOURCES:.c=.o)
     25 
     26 PROGS = $(OBJECTS:.o=)
     27 
     28 PROG_DEFINES = -DPIPE_SEARCH_DIR=\"$(PIPE_SRC_DIR)\" \
     29                $(GALLIUM_PIPE_LOADER_DEFINES)
     30 
     31 PIPE_SRC_DIR = $(TOP)/src/gallium/targets/pipe-loader
     32 
     33 ##### TARGETS #####
     34 
     35 default: $(PROGS) pipes
     36 
     37 install:
     38 
     39 clean:
     40 	-rm -f $(PROGS)
     41 	-rm -f *.o
     42 	-rm -f result.bmp
     43 	@$(MAKE) -C $(PIPE_SRC_DIR) clean
     44 
     45 pipes:
     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