Makefile revision 6e8897ff9f90601ebf6eed500ad942c11b54d1f7
1TOP = ../../../.. 2include $(TOP)/configs/current 3 4common_INCLUDES = \ 5 -I. \ 6 -I$(TOP)/src/gallium/include \ 7 -I$(TOP)/src/gallium/auxiliary \ 8 -I$(TOP)/src/egl/main \ 9 -I$(TOP)/include 10 11common_SOURCES = $(wildcard common/*.c) 12common_OBJECTS = $(common_SOURCES:.c=.o) 13 14 15x11_INCLUDES = \ 16 -I$(TOP)/src/gallium/drivers \ 17 -I$(TOP)/src/glx \ 18 -I$(TOP)/src/mesa \ 19 $(shell pkg-config --cflags-only-I libdrm) 20 21x11_SOURCES = $(wildcard x11/*.c) \ 22 $(TOP)/src/glx/dri2.c 23x11_OBJECTS = $(x11_SOURCES:.c=.o) 24 25 26kms_INCLUDES = $(shell pkg-config --cflags-only-I libdrm) 27kms_SOURCES = $(wildcard kms/*.c) 28kms_OBJECTS = $(kms_SOURCES:.c=.o) 29 30 31ALL_INCLUDES = $(common_INCLUDES) $(x11_INCLUDES) $(kms_INCLUDES) 32ALL_SOURCES = $(common_SOURCES) $(x11_SOURCES) $(kms_SOURCES) 33ALL_OBJECTS = $(common_OBJECTS) $(x11_OBJECTS) $(kms_OBJECTS) 34 35##### TARGETS ##### 36 37EGL_DISPLAYS_MODS = $(foreach dpy, $(EGL_DISPLAYS), libegl$(dpy).a) 38 39default: depend $(EGL_DISPLAYS_MODS) 40 41 42libeglx11.a: $(x11_OBJECTS) $(common_OBJECTS) Makefile 43 $(MKLIB) -o eglx11 -static $(x11_OBJECTS) $(common_OBJECTS) 44 45libeglkms.a: $(kms_OBJECTS) $(common_OBJECTS) Makefile 46 $(MKLIB) -o eglkms -static $(kms_OBJECTS) $(common_OBJECTS) 47 48depend: 49 rm -f depend 50 touch depend 51 $(MKDEP) $(MKDEP_OPTIONS) $(ALL_INCLUDES) $(ALL_SOURCES) 2> /dev/null 52 53clean: 54 rm -f $(ALL_OBJECTS) 55 rm -f $(EGL_DISPLAYS_MODS) 56 rm -f depend depend.bak 57 58# Dummy target 59install: 60 @echo -n "" 61 62##### RULES ##### 63 64$(common_OBJECTS): %.o: %.c 65 $(CC) -c $(common_INCLUDES) $(DEFINES) $(CFLAGS) $< -o $@ 66 67$(x11_OBJECTS): %.o: %.c 68 $(CC) -c $(common_INCLUDES) $(x11_INCLUDES) $(DEFINES) $(CFLAGS) $< -o $@ 69 70$(kms_OBJECTS): %.o: %.c 71 $(CC) -c $(common_INCLUDES) $(kms_INCLUDES) $(DEFINES) $(CFLAGS) $< -o $@ 72 73sinclude depend 74