LIBNAME = glsl
-C_SOURCES = \
- glcpp/glcpp.c \
+LIBGLCPP_SOURCES = \
glcpp/glcpp-lex.c \
glcpp/glcpp-parse.c \
glcpp/pp.c \
glcpp/xtalloc.c
+GLCPP_SOURCES = \
+ $(LIBGLCPP_SOURCES) \
+ glcpp/glcpp.c
+
+C_SOURCES = \
+ $(LIBGLCPP_SOURCES)
+
CXX_SOURCES = \
ast_expr.cpp \
ast_function.cpp \
$(TOP)/src/glsl/libglsl.a \
$(shell pkg-config --libs talloc)
-APPS = glsl_compiler
+APPS = glsl_compiler glcpp/glcpp
+
GLSL2_C_SOURCES = \
../mesa/shader/hash_table.c \
../mesa/shader/symbol_table.c
### Basic defines ###
+GLCPP_OBJECTS = \
+ $(GLCPP_SOURCES:.c=.o) \
+ ../mesa/shader/hash_table.o
+
OBJECTS = \
$(C_SOURCES:.c=.o) \
$(CXX_SOURCES:.cpp=.o)
glsl_compiler: $(GLSL2_OBJECTS) libglsl.a
$(APP_CXX) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLSL2_OBJECTS) $(LIBS) -o $@
+glcpp/glcpp: $(GLCPP_OBJECTS) libglsl.a
+ $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLCPP_OBJECTS) $(LIBS) -o $@
+
.cpp.o:
$(CXX) -c $(INCLUDES) $(CXXFLAGS) $(LIBRARY_DEFINES) $< -o $@