diff options
author | Michal Krol <michal@vmware.com> | 2009-12-17 17:00:46 +0100 |
---|---|---|
committer | Michal Krol <michal@vmware.com> | 2009-12-17 17:00:46 +0100 |
commit | e195eab9093d2a6cf55a42b2e7789c9a381b7782 (patch) | |
tree | 508408dbb9537f508e6831df033506da8f66b8da /src/glsl/Makefile.template | |
parent | 1c28073fdfb56a241424c739b57845f47fa05002 (diff) | |
parent | 75f371e973d19650a5c157a0844e43ffdea5e43e (diff) |
Merge branch 'glsl-pp-rework-2'
Diffstat (limited to 'src/glsl/Makefile.template')
-rw-r--r-- | src/glsl/Makefile.template | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/glsl/Makefile.template b/src/glsl/Makefile.template new file mode 100644 index 0000000000..974987a0a0 --- /dev/null +++ b/src/glsl/Makefile.template @@ -0,0 +1,50 @@ +# src/glsl/Makefile.template + +# Template makefile for glsl libraries. +# +# Usage: +# The minimum that the including makefile needs to define +# is TOP, LIBNAME and one of of the *_SOURCES. +# +# Optional defines: +# LIBRARY_INCLUDES are appended to the list of includes directories. +# LIBRARY_DEFINES is not used for makedepend, but for compilation. + + +### Basic defines ### + +OBJECTS = $(C_SOURCES:.c=.o) + +INCLUDES = \ + -I. \ + $(LIBRARY_INCLUDES) + + +##### TARGETS ##### + +default: depend lib$(LIBNAME).a + +lib$(LIBNAME).a: $(OBJECTS) Makefile $(TOP)/src/glsl/Makefile.template + $(MKLIB) -o $(LIBNAME) -static $(OBJECTS) + +depend: $(C_SOURCES) + rm -f depend + touch depend + $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) 2> /dev/null + +# Remove .o and backup files +clean: + rm -f $(OBJECTS) lib$(LIBNAME).a depend depend.bak + +# Dummy target +install: + @echo -n "" + + +##### RULES ##### + +.c.o: + $(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@ + +-include depend + |