diff options
author | michal <michal@transistor.(none)> | 2009-12-10 01:03:15 +0100 |
---|---|---|
committer | michal <michal@transistor.(none)> | 2009-12-10 01:03:15 +0100 |
commit | 068596c9a7e8d330ffdff8ad8700bd6093b5bdea (patch) | |
tree | 9a7cab7a0c44d83169f59ac3aa4ac2b60e8c7acb /src/glsl | |
parent | 77a0a3e5ca5dfa951056d9054b4147e3ea0965f3 (diff) |
Build mesa glsl with make.
Still don't know how to add glsl to mesa dependencies.
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/Makefile | 15 | ||||
-rw-r--r-- | src/glsl/Makefile.template | 50 | ||||
-rw-r--r-- | src/glsl/apps/Makefile | 42 | ||||
-rw-r--r-- | src/glsl/cl/Makefile | 13 | ||||
-rw-r--r-- | src/glsl/pp/Makefile | 26 |
5 files changed, 146 insertions, 0 deletions
diff --git a/src/glsl/Makefile b/src/glsl/Makefile new file mode 100644 index 00000000000..ca7f2d2ac7d --- /dev/null +++ b/src/glsl/Makefile @@ -0,0 +1,15 @@ +# src/glsl/Makefile + +TOP = ../.. + +include $(TOP)/configs/current + +SUBDIRS = pp cl apps + +default install clean: + @for dir in $(SUBDIRS) ; do \ + if [ -d $$dir ] ; then \ + (cd $$dir && $(MAKE) $@) || exit 1; \ + fi \ + done + diff --git a/src/glsl/Makefile.template b/src/glsl/Makefile.template new file mode 100644 index 00000000000..974987a0a04 --- /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 + diff --git a/src/glsl/apps/Makefile b/src/glsl/apps/Makefile new file mode 100644 index 00000000000..c80fcb9d974 --- /dev/null +++ b/src/glsl/apps/Makefile @@ -0,0 +1,42 @@ +# src/glsl/apps/Makefile + +TOP = ../../.. + +include $(TOP)/configs/current + +LIBS = \ + $(TOP)/src/glsl/pp/libglslpp.a \ + $(TOP)/src/glsl/cl/libglslcl.a + +SOURCES = \ + compile.c \ + process.c \ + purify.c \ + tokenise.c \ + version.c + +APPS = $(SOURCES:%.c=%) + +INCLUDES = -I. + + +##### RULES ##### + +.SUFFIXES: +.SUFFIXES: .c + +.c: + $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@ + +.c.o: + $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ + + +##### TARGETS ##### + +default: $(APPS) + +clean: + -rm -f $(APPS) + -rm -f *.o + diff --git a/src/glsl/cl/Makefile b/src/glsl/cl/Makefile new file mode 100644 index 00000000000..04a52df8c33 --- /dev/null +++ b/src/glsl/cl/Makefile @@ -0,0 +1,13 @@ +#src/glsl/cl/Makefile + +TOP = ../../.. + +include $(TOP)/configs/current + +LIBNAME = glslcl + +C_SOURCES = \ + sl_cl_parse.c + +include ../Makefile.template + diff --git a/src/glsl/pp/Makefile b/src/glsl/pp/Makefile new file mode 100644 index 00000000000..819079f6258 --- /dev/null +++ b/src/glsl/pp/Makefile @@ -0,0 +1,26 @@ +#src/glsl/pp/Makefile + +TOP = ../../.. + +include $(TOP)/configs/current + +LIBNAME = glslpp + +C_SOURCES = \ + sl_pp_context.c \ + sl_pp_define.c \ + sl_pp_dict.c \ + sl_pp_error.c \ + sl_pp_expression.c \ + sl_pp_extension.c \ + sl_pp_if.c \ + sl_pp_line.c \ + sl_pp_macro.c \ + sl_pp_pragma.c \ + sl_pp_process.c \ + sl_pp_purify.c \ + sl_pp_token.c \ + sl_pp_version.c + +include ../Makefile.template + |