summaryrefslogtreecommitdiff
path: root/progs/demos
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-01-09 17:26:08 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-01-09 17:26:08 +0000
commit516f9bc6e306fe7820649ead125d557b46ca8419 (patch)
tree4d68477151cf2082007e04a06365c3822a9490ba /progs/demos
parent575d24a5ffb84b9122a3d3d85d138a7bbe06284b (diff)
some new/improved rules
Diffstat (limited to 'progs/demos')
-rw-r--r--progs/demos/Makefile49
1 files changed, 38 insertions, 11 deletions
diff --git a/progs/demos/Makefile b/progs/demos/Makefile
index b03a5dbafd..21bb1b7d3e 100644
--- a/progs/demos/Makefile
+++ b/progs/demos/Makefile
@@ -66,26 +66,47 @@ PROGS = \
# make executable from .c file:
-.c: $(LIB_DEP)
- $(CC) -I$(INCDIR) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
+.c: $(LIB_DEP) readtex.o
+ $(CC) -I$(INCDIR) $(CFLAGS) $< readtex.o $(APP_LIB_DEPS) -o $@
##### TARGETS #####
-default: readtex.c readtex.h $(PROGS)
+default: readtex.o $(PROGS)
-clean:
- -rm -f $(PROGS)
- -rm -f *.o *~
- -rm -f readtex.[ch]
+readtex.c: $(TOP)/progs/util/readtex.c
+ cp $< .
+
+readtex.h: $(TOP)/progs/util/readtex.h
+ cp $< .
+
+readtex.o: readtex.c readtex.h
+ $(CC) -c -I$(INCDIR) $(CFLAGS) readtex.c
+
+
+showbuffer.c: $(TOP)/progs/util/showbuffer.c
+ cp $< .
+
+showbuffer.h: $(TOP)/progs/util/showbuffer.h
+ cp $< .
+
+showbuffer.o: showbuffer.c showbuffer.h
+ $(CC) -c -I$(INCDIR) $(CFLAGS) showbuffer.c
-readtex.c:
- cp $(TOP)/progs/util/readtex.c .
+reflect: reflect.o showbuffer.o readtex.o
+ $(CC) -I$(INCDIR) $(CFLAGS) reflect.o showbuffer.o readtex.o $(APP_LIB_DEPS) -o $@
-readtex.h:
- cp $(TOP)/progs/util/readtex.h .
+reflect.o: reflect.c showbuffer.h
+ $(CC) -c -I$(INCDIR) $(CFLAGS) reflect.c
+
+
+shadowtex: shadowtex.o showbuffer.o
+ $(CC) -I$(INCDIR) $(CFLAGS) shadowtex.o showbuffer.o $(APP_LIB_DEPS) -o $@
+
+shadowtex.o: shadowtex.c showbuffer.h
+ $(CC) -c -I$(INCDIR) $(CFLAGS) shadowtex.c
# special case: need the -lOSMesa library:
osdemo: osdemo.c
@@ -95,3 +116,9 @@ osdemo: osdemo.c
osdemo32: osdemo32.c
$(CC) -I$(INCDIR) $(CFLAGS) osdemo32.c $(OSMESA32_LIBS) -o $@
+
+
+clean:
+ -rm -f $(PROGS)
+ -rm -f *.o *~
+ -rm -f readtex.[ch]