X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Frasterize;a=blobdiff_plain;f=Makefile;h=1dee42f0110eb896d8a4ce9ca83d0d0d5b159b00;hp=d361c49d719b3d7cfe5a69a3f468c67c729d14b4;hb=HEAD;hpb=3955aa40277c4b86a43b21e78d55d2fea7b643ce diff --git a/Makefile b/Makefile index d361c49..1dee42f 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ IUSE = BACKFACE_CULLING BLENDING DEPTH_TEST EXTRA_INLINE NDEBUG \ VIEWER = feh CC = gcc +EXEEXT = CFLAGS = -std=c99 -O2 -g -pg CPPFLAGS= -MMD $(IUSE:%=-D%) LDLIBS = -lm @@ -13,14 +14,15 @@ LDLIBS = -lm 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 +33,10 @@ realclean: distclean dist: git archive HEAD --prefix=$(PROJECT)/ --output=$(PROJECT).zip -run: $(PROJECT) +run: $(PROG) ./$< && $(VIEWER) scene.ppm -debug: $(PROJECT) +debug: $(PROG) gdb ./$< -include $(DEPS)