1TOP = ../../../.. 2include $(TOP)/configs/current 3 4gbm_INCLUDES = \ 5 -I. \ 6 -I$(TOP)/src/gallium/include \ 7 -I$(TOP)/src/gallium/auxiliary \ 8 -I$(TOP)/src/gbm/main \ 9 -I$(TOP)/include 10 11gbm_SOURCES = $(wildcard *.c) 12gbm_OBJECTS = $(gbm_SOURCES:.c=.o) 13 14ALL_INCLUDES = $(gbm_INCLUDES) 15ALL_SOURCES = $(gbm_SOURCES) 16 17GBM_OBJECTS = $(gbm_OBJECTS) 18GBM_CPPFLAGS = $(gbm_INCLUDES) 19 20ifneq ($(findstring wayland, $(EGL_PLATFORMS)),) 21GBM_CPPFLAGS += -DHAVE_WAYLAND_PLATFORM 22endif 23 24##### TARGETS ##### 25 26default: depend libgbm.a 27 28libgbm.a: $(GBM_OBJECTS) Makefile 29 $(MKLIB) -o gbm -static $(GBM_OBJECTS) 30 31depend: 32 rm -f depend 33 touch depend 34 $(MKDEP) $(MKDEP_OPTIONS) $(ALL_INCLUDES) $(ALL_SOURCES) 2> /dev/null 35 36clean: 37 rm -f libgbm.a 38 rm -f $(GBM_OBJECTS) 39 rm -f depend depend.bak 40 41# Dummy target 42install: 43 @echo -n "" 44 45##### RULES ##### 46 47$(gbm_OBJECTS): %.o: %.c 48 $(CC) -c $(GBM_CPPFLAGS) $(DEFINES) $(CFLAGS) $< -o $@ 49 50sinclude depend 51