1
0
mirror of git://projects.qi-hardware.com/ben-scans.git synced 2024-11-22 08:19:44 +02:00
ben-scans/solidify/Makefile
Werner Almesberger f6ed3bf762 solidify now stores the context of sessions in project description files.
- solidify/Makefile (OBJS): added project.o
- solidify/Makefile (new): new target to create a new project
- solidify/Makefile (run): changed to resume previously created project
- solidify/util.h (stralloc): added stralloc (from fped)
- solidify/project.h, solidify/project.c: create, load, and save project
  description files
- solidify/solidify.c (clicked, gui_buttons, gui, main): updated to use
  project instead of solid
- solidify/solidify.c (usage, main): new invocation: four arguments to start
  new project, one argument to resume old project
2010-09-24 21:01:59 -03:00

91 lines
2.2 KiB
Makefile

#
# Makefile - Makefile of solidify
#
# Written 2010 by Werner Almesberger
# Copyright 2010 by Werner Almesberger
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
SHELL = /bin/bash
OBJS = array.o face.o histo.o level.o matrix.o overlap.o project.o solid.o \
solidify.o style.o util.o
CFLAGS_WARN = -Wall -Wshadow -Wmissing-prototypes \
-Wmissing-declarations -Wno-format-zero-length
CFLAGS = $(CFLAGS_WARN) -g -O9 `pkg-config --cflags gtk+-2.0`
LDFLAGS = -lm `pkg-config --libs gtk+-2.0`
# ----- Verbosity control -----------------------------------------------------
CC_normal := $(CC)
DEPEND_normal := $(CPP) $(CFLAGS) -MM -MG
CC_quiet = @echo " CC " $@ && $(CC_normal)
DEPEND_quiet = @$(DEPEND_normal)
ifeq ($(V),1)
CC = $(CC_normal)
DEPEND = $(DEPEND_normal)
else
CC = $(CC_quiet)
DEPEND = $(DEPEND_quiet)
endif
# ----- Rules -----------------------------------------------------------------
.PHONY: all clean spotless
all: solidify
solidify: $(OBJS)
clean:
rm -f $(OBJS) $(OBJS:.o=.d)
spotless: clean
rm -f solidify
# ----- Experimental execution ------------------------------------------------
PRJ=http://projects.qi-hardware.com/index.php/p/ben-scans/source/tree/master
DIR=$(PRJ)/data/csv
FACE_A=$(DIR)/ben-batcvr-outside-100um.txt.bz2
FACE_B=$(DIR)/ben-batcvr-inside-100um.txt.bz2
D=1.16
.PHONY: new run pov disp
new: solidify
rm -f batcvr.sfy
./solidify batcvr.sfy $(FACE_A) $(FACE_B) $(D) >batcvr.inc
run: solidify
./solidify batcvr.sfy >batcvr.inc
pov:
povray +A -W1280 -H1024 main.pov
disp:
display main.png
# ----- Dependencies ----------------------------------------------------------
# compile and generate dependencies, from fped, based on
# http://scottmcpeak.com/autodepend/autodepend.html
%.o: %.c
$(CC) -c $(CFLAGS) $*.c -o $*.o
$(DEPEND) $*.c | \
sed -e \
'/^\(.*:\)\? */{p;s///;s/ *\\\?$$/ /;s/ */:\n/g;H;}' \
-e '$${g;p;}' -e d >$*.d; \
[ "$${PIPESTATUS[*]}" = "0 0" ] || { rm -f $*.d; exit 1; }
-include $(OBJS:.o=.d)