]> Dogcows Code - chaz/rasterize/blobdiff - Makefile
add texture mapping with perspective correction
[chaz/rasterize] / Makefile
index b3e118f57f6faadb104bbb4f92ee613f6944f09b..d361c49d719b3d7cfe5a69a3f468c67c729d14b4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,18 @@
 
-PROJECT = project1
-SRCS    = main.c common.c list.c pixmap.c scene.c tri.c
+PROJECT = rasterize
+IUSE    = BACKFACE_CULLING BLENDING DEPTH_TEST EXTRA_INLINE NDEBUG \
+          CALC_NORMALS LIGHTING=3 SMOOTH_COLOR TEXTURING
 
-VIEWER = feh
+VIEWER  = feh
 
 CC      = gcc
-CFLAGS  = -std=c99 -O0 -ggdb
-CPPFLAGS= -MMD -DDEBUG
+CFLAGS  = -std=c99 -O2 -g -pg
+CPPFLAGS= -MMD $(IUSE:%=-D%)
 LDLIBS  = -lm
 
-OBJS   = $(SRCS:%.c=%.o)
-DEPS   = $(OBJS:%.o=%.d)
+SRCS    = main.c array.c common.c list.c model.c raster.c rbtree.c scene.c
+OBJS    = $(SRCS:%.c=%.o)
+DEPS    = $(OBJS:%.o=%.d)
 
 all: $(PROJECT)
 
@@ -21,7 +23,13 @@ clean:
        rm -f $(PROJECT) $(OBJS) $(DEPS)
 
 distclean: clean
-       rm -f scene.ppm scene.bmp
+       rm -f tags gmon.out
+
+realclean: distclean
+       rm -rf frames .*.raw .*.obj $(PROJECT).zip
+
+dist:
+       git archive HEAD --prefix=$(PROJECT)/ --output=$(PROJECT).zip
 
 run: $(PROJECT)
        ./$< && $(VIEWER) scene.ppm
@@ -30,4 +38,7 @@ debug: $(PROJECT)
        gdb ./$<
 
 -include $(DEPS)
+$(OBJS): Makefile
+
+.PHONY: all clean distclean dist run debug
 
This page took 0.016712 seconds and 4 git commands to generate.