]> Dogcows Code - chaz/rasterize/blobdiff - Makefile
fixes for compiling with mingw32
[chaz/rasterize] / Makefile
index 024bb482ab202cc43adbc2ad0baff74d6fb4ac6d..1dee42f0110eb896d8a4ce9ca83d0d0d5b159b00 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,58 +1,46 @@
 
-PROJECT = project2
-IUSE    = CLIPPING DEPTH_TEST SMOOTH_COLOR \
-                 EXTRA_INLINE NDEBUG RASTER_STATS RENDER_PROGRESS RENDER_TIMER
-
-
-# BACKFACE_CULLING  prevent drawing triangles that are not facing forward
-# CLIPPING          turn on clipping (you really always want this)
-# DEPTH_TEST        enable the z buffer for depth testing
-# EXPORT_BMP        save scene as bitmap (enabled by default)
-# EXPORT_PPM        save scene as a PPM file (also enabled by default)
-# EXTRA_INLINE      allow the compiler to inline even more aggressively
-# LIGHTING          turn the lights on (experimental)
-# NDEBUG            disable assertions and other nonessential checks
-# PRE_NORMALS[=n]   pre-compute mesh normals at scene-loading time;
-#                   set to 1 for per-face normals, 2 for averaged normals,
-#                   or 3 to also enable caching the computed normals
-# RASTER_STATS      print triangle count and optimization savings at the end
-# RENDER_PROGRESS   print progress while drawing the scene
-# RENDER_TIMER      add a timer to see how long the renderer takes
-# SMOOTH_COLOR      interpolate colors smoothly between triangle vertices
-
-VIEWER = feh
+PROJECT = rasterize
+IUSE    = BACKFACE_CULLING BLENDING DEPTH_TEST EXTRA_INLINE NDEBUG \
+          CALC_NORMALS LIGHTING=3 SMOOTH_COLOR TEXTURING
+
+VIEWER  = feh
 
 CC      = gcc
+EXEEXT  =
 CFLAGS  = -std=c99 -O2 -g -pg
 CPPFLAGS= -MMD $(IUSE:%=-D%)
 LDLIBS  = -lm
 
-SRCS    = main.c common.c list.c raster.c rbtree.c scene.c
-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)
+PROG    = $(PROJECT)$(EXEEXT)
 
-all: $(PROJECT)
+all: $(PROG)
 
-$(PROJECT): $(OBJS)
+$(PROG): $(OBJS)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
 
 clean:
-       rm -f $(PROJECT) $(OBJS) $(DEPS)
+       rm -f $(PROG) $(OBJS) $(DEPS)
 
 distclean: clean
-       rm -f tags gmon.out scene.ppm scene.bmp
+       rm -f tags gmon.out
+
+realclean: distclean
+       rm -rf frames .*.raw .*.obj $(PROJECT).zip
 
 dist:
-       git archive $(PROJECT) --prefix=$(PROJECT)/ --output=$(PROJECT).zip
+       git archive HEAD --prefix=$(PROJECT)/ --output=$(PROJECT).zip
 
-run: $(PROJECT)
+run: $(PROG)
        ./$< && $(VIEWER) scene.ppm
 
-debug: $(PROJECT)
+debug: $(PROG)
        gdb ./$<
 
 -include $(DEPS)
 $(OBJS): Makefile
 
-.PHONY: all clean distclean run debug
+.PHONY: all clean distclean dist run debug
 
This page took 0.017781 seconds and 4 git commands to generate.