Merge commit 'origin/master' into gallium-0.2
[mesa.git] / progs / slang / Makefile
index 1c602ce49c510f897411b39938bd380698b63a81..f6f34fcd25f11b3531703f3c3e3e94a3fde2df23 100644 (file)
@@ -8,6 +8,8 @@ INCDIR = $(TOP)/include
 
 LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
 
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
+
 #
 # targets
 #
@@ -22,34 +24,34 @@ tests: default
        ! ./cltest 2> /dev/null | (grep -e ^[*][*][*])
 
 clean:
-       rm -f cltest.o sotest.o vstest.o framework.o cltest sotest vstest
+       -rm -f cltest.o sotest.o vstest.o framework.o cltest sotest vstest
 
 #
 # executables
 #
 
 cltest: cltest.o framework.o $(LIB_DEP)
-       $(CC) cltest.o framework.o $(APP_LIB_DEPS) -o cltest
+       $(CC) $(CFLAGS) $(LDFLAGS) cltest.o framework.o $(LIBS) -o cltest
 
 sotest: sotest.o framework.o $(LIB_DEP)
-       $(CC) sotest.o framework.o $(APP_LIB_DEPS) -o sotest
+       $(CC) $(CFLAGS) $(LDFLAGS) sotest.o framework.o $(LIBS) -o sotest
 
 vstest: vstest.o framework.o $(LIB_DEP)
-       $(CC) vstest.o framework.o $(APP_LIB_DEPS) -o vstest
+       $(CC) $(CFLAGS) $(LDFLAGS) vstest.o framework.o $(LIBS) -o vstest
 
 #
 # objects
 #
 
 framework.o: framework.c framework.h
-       $(CC) -c -I$(INCDIR) framework.c -o framework.o
+       $(CC) -c -I$(INCDIR) $(CFLAGS) framework.c -o framework.o
 
 cltest.o: cltest.c framework.h
-       $(CC) -c -I$(INCDIR) cltest.c -o cltest.o
+       $(CC) -c -I$(INCDIR) $(CFLAGS) cltest.c -o cltest.o
 
 sotest.o: sotest.c framework.h
-       $(CC) -c -I$(INCDIR) sotest.c -o sotest.o
+       $(CC) -c -I$(INCDIR) $(CFLAGS) sotest.c -o sotest.o
 
 vstest.o: vstest.c framework.h
-       $(CC) -c -I$(INCDIR) vstest.c -o vstest.o
+       $(CC) -c -I$(INCDIR) $(CFLAGS) vstest.c -o vstest.o