diff options
author | Brian Paul <[email protected]> | 2009-10-01 12:58:36 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-10-01 13:14:48 -0600 |
commit | ca1bda552d1cd1a6ddc911e535681a10b9c2d846 (patch) | |
tree | e781dc211d35fe3756a7e6cb90bfa9c4c919e242 /progs/objviewer/Makefile | |
parent | e32a341be66391e0ea1cc6ce19bbd57997f46b6b (diff) |
progs/objviewer: Wavefront .obj file loader/viewer demo
Adapted from code written by Nate Robins. See README.txt.
Diffstat (limited to 'progs/objviewer/Makefile')
-rw-r--r-- | progs/objviewer/Makefile | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/progs/objviewer/Makefile b/progs/objviewer/Makefile new file mode 100644 index 00000000000..d2c5246a2b9 --- /dev/null +++ b/progs/objviewer/Makefile @@ -0,0 +1,83 @@ +TOP = ../.. +include $(TOP)/configs/current + +INCDIR = $(TOP)/include + +LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) \ + -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) + +# using : to avoid APP_CC pointing to CC loop +CC := $(APP_CC) +CFLAGS := -I$(INCDIR) $(CFLAGS) +LDLIBS = $(LIBS) + +SOURCES = \ + glm.c \ + glmdraw.c \ + objview.c \ + trackball.c \ + skybox.c \ + readtex.c \ + shaderutil.c + +HEADERS = \ + extfuncs.h \ + readtex.h \ + shaderutil.h \ + trackball.h + +OBJS = $(SOURCES:.c=.o) + +PROG = objview + + +.c.o: + $(CC) -c $(CFLAGS) $< -o $@ + +default: $(PROG) + +$(PROG): $(OBJS) + $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ + +$(OBJS): $(HEADERS) + + +### Extra dependencies + +extfuncs.h: $(TOP)/progs/util/extfuncs.h + cp $< . + +readtex.c: $(TOP)/progs/util/readtex.c + cp $< . + +readtex.h: $(TOP)/progs/util/readtex.h + cp $< . + +shaderutil.c: $(TOP)/progs/util/shaderutil.c + cp $< . + +shaderutil.h: $(TOP)/progs/util/shaderutil.h + cp $< . + +trackball.c: $(TOP)/progs/util/trackball.c + cp $< . + +trackball.h: $(TOP)/progs/util/trackball.h + cp $< . + + +clean: + -rm -f $(PROG) $(OBJS) + -rm -f *.o *~ + -rm -f extfuncs.h + -rm -f shaderutil.* + -rm -f trackball.* + -rm -f readtex.* + + +depend: $(SOURCES) + @$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(SOURCES) \ + > /dev/null 2>/dev/null + + +-include depend |