mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-25 03:58:19 +02:00
64 lines
1.3 KiB
Makefile
64 lines
1.3 KiB
Makefile
# -*-makefile-*-
|
|
|
|
|
|
# We still have a dependency on the "dri" buffer manager. Most likely
|
|
# the interface can be reused in non-dri environments, and also as a
|
|
# frontend to simpler memory managers.
|
|
#
|
|
COMMON_SOURCES =
|
|
|
|
OBJECTS = $(C_SOURCES:.c=.o) \
|
|
$(CPP_SOURCES:.cpp=.o) \
|
|
$(ASM_SOURCES:.S=.o)
|
|
|
|
|
|
### Include directories
|
|
INCLUDES = \
|
|
-I. \
|
|
-I$(TOP)/src/gallium/include \
|
|
-I$(TOP)/src/gallium/auxiliary \
|
|
-I$(TOP)/src/gallium/drivers \
|
|
-I$(TOP)/include \
|
|
$(DRIVER_INCLUDES)
|
|
|
|
|
|
##### RULES #####
|
|
|
|
.c.o:
|
|
$(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
|
|
|
|
.cpp.o:
|
|
$(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DRIVER_DEFINES) $< -o $@
|
|
|
|
.S.o:
|
|
$(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
|
|
|
|
|
|
##### TARGETS #####
|
|
|
|
default: depend symlinks $(LIBNAME)
|
|
|
|
|
|
$(LIBNAME): $(OBJECTS) Makefile $(TOP)/src/gallium/Makefile.template
|
|
$(TOP)/bin/mklib -o $@ -static $(OBJECTS) $(DRIVER_LIBS)
|
|
|
|
|
|
depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
|
|
rm -f depend
|
|
touch depend
|
|
$(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) \
|
|
$(ASM_SOURCES) 2> /dev/null
|
|
|
|
|
|
# Emacs tags
|
|
tags:
|
|
etags `find . -name \*.[ch]` `find ../include`
|
|
|
|
|
|
# Remove .o and backup files
|
|
clean::
|
|
-rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
|
|
-rm -f depend depend.bak
|
|
|
|
|
|
include depend
|