]> Dogcows Code - chaz/rasterize/blobdiff - Makefile
add opengl support
[chaz/rasterize] / Makefile
index d361c49d719b3d7cfe5a69a3f468c67c729d14b4..c186a65e61bbe9e12501da749971ac79c313cc44 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,26 +1,26 @@
 
 PROJECT = rasterize
 IUSE    = BACKFACE_CULLING BLENDING DEPTH_TEST EXTRA_INLINE NDEBUG \
-          CALC_NORMALS LIGHTING=3 SMOOTH_COLOR TEXTURING
-
-VIEWER  = feh
+          CALC_NORMALS LIGHTING=3 SMOOTH_COLOR TEXTURING OPENGL
 
 CC      = gcc
+EXEEXT  =
 CFLAGS  = -std=c99 -O2 -g -pg
 CPPFLAGS= -MMD $(IUSE:%=-D%)
-LDLIBS  = -lm
+LDLIBS  = -lm -lglut -lGL
 
 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
@@ -31,10 +31,10 @@ realclean: distclean
 dist:
        git archive HEAD --prefix=$(PROJECT)/ --output=$(PROJECT).zip
 
-run: $(PROJECT)
-       ./$< && $(VIEWER) scene.ppm
+run: $(PROG)
+       ./$<
 
-debug: $(PROJECT)
+debug: $(PROG)
        gdb ./$<
 
 -include $(DEPS)
This page took 0.026744 seconds and 4 git commands to generate.