summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/drm/nouveau/common/Makefile.template
diff options
context:
space:
mode:
authorYounes Manton <[email protected]>2009-01-10 13:30:29 -0500
committerYounes Manton <[email protected]>2009-01-10 13:52:07 -0500
commit8ee238be7587a232beeb56b1dc3b75e1b8fb903e (patch)
treea0b25eda15eb123ff7742f18faa735ea9e10b288 /src/gallium/winsys/drm/nouveau/common/Makefile.template
parent734b3cb182b4b7d1075faf60c1a23ab0a55af356 (diff)
nouveau: Factor out common winsys bits into libnouveaudrm.a
Diffstat (limited to 'src/gallium/winsys/drm/nouveau/common/Makefile.template')
-rw-r--r--src/gallium/winsys/drm/nouveau/common/Makefile.template59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/gallium/winsys/drm/nouveau/common/Makefile.template b/src/gallium/winsys/drm/nouveau/common/Makefile.template
new file mode 100644
index 00000000000..e40836e0a82
--- /dev/null
+++ b/src/gallium/winsys/drm/nouveau/common/Makefile.template
@@ -0,0 +1,59 @@
+# -*-makefile-*-
+
+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 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