X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Frasterize;a=blobdiff_plain;f=Makefile;h=7d119e4061dbf22bde738697f72d7b1a1f010e76;hp=b3e118f57f6faadb104bbb4f92ee613f6944f09b;hb=e16cf0578f4baaf879e4ab9d3528a765bfd29be0;hpb=0f2508a4f227523a6b7e54798487af19d06a6ce9 diff --git a/Makefile b/Makefile index b3e118f..7d119e4 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,15 @@ -PROJECT = project1 -SRCS = main.c common.c list.c pixmap.c scene.c tri.c +PROJECT = rasterize +IUSE = DEPTH_TEST EXTRA_INLINE SMOOTH_COLOR VIEWER = feh CC = gcc -CFLAGS = -std=c99 -O0 -ggdb -CPPFLAGS= -MMD -DDEBUG +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) @@ -21,7 +22,10 @@ clean: rm -f $(PROJECT) $(OBJS) $(DEPS) distclean: clean - rm -f scene.ppm scene.bmp + rm -f tags gmon.out + +dist: + git archive HEAD --prefix=$(PROJECT)/ --output=$(PROJECT).zip run: $(PROJECT) ./$< && $(VIEWER) scene.ppm @@ -30,4 +34,7 @@ debug: $(PROJECT) gdb ./$< -include $(DEPS) +$(OBJS): Makefile + +.PHONY: all clean distclean run debug