Root/solidify/Makefile

Source at commit f6ed3bf762b63b950cf801c9282101a818c0ff8e created 8 years 11 months ago.
By Werner Almesberger, solidify now stores the context of sessions in project description files.
1#
2# Makefile - Makefile of solidify
3#
4# Written 2010 by Werner Almesberger
5# Copyright 2010 by Werner Almesberger
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12
13SHELL = /bin/bash
14
15OBJS = array.o face.o histo.o level.o matrix.o overlap.o project.o solid.o \
16       solidify.o style.o util.o
17
18CFLAGS_WARN = -Wall -Wshadow -Wmissing-prototypes \
19          -Wmissing-declarations -Wno-format-zero-length
20
21CFLAGS = $(CFLAGS_WARN) -g -O9 `pkg-config --cflags gtk+-2.0`
22LDFLAGS = -lm `pkg-config --libs gtk+-2.0`
23
24# ----- Verbosity control -----------------------------------------------------
25
26CC_normal := $(CC)
27DEPEND_normal := $(CPP) $(CFLAGS) -MM -MG
28
29CC_quiet = @echo " CC " $@ && $(CC_normal)
30DEPEND_quiet = @$(DEPEND_normal)
31
32ifeq ($(V),1)
33    CC = $(CC_normal)
34    DEPEND = $(DEPEND_normal)
35else
36    CC = $(CC_quiet)
37    DEPEND = $(DEPEND_quiet)
38endif
39
40# ----- Rules -----------------------------------------------------------------
41
42.PHONY: all clean spotless
43
44all: solidify
45
46solidify: $(OBJS)
47
48clean:
49        rm -f $(OBJS) $(OBJS:.o=.d)
50
51spotless: clean
52        rm -f solidify
53
54# ----- Experimental execution ------------------------------------------------
55
56PRJ=http://projects.qi-hardware.com/index.php/p/ben-scans/source/tree/master
57DIR=$(PRJ)/data/csv
58FACE_A=$(DIR)/ben-batcvr-outside-100um.txt.bz2
59FACE_B=$(DIR)/ben-batcvr-inside-100um.txt.bz2
60D=1.16
61
62.PHONY: new run pov disp
63
64new: solidify
65        rm -f batcvr.sfy
66        ./solidify batcvr.sfy $(FACE_A) $(FACE_B) $(D) >batcvr.inc
67
68run: solidify
69        ./solidify batcvr.sfy >batcvr.inc
70
71pov:
72        povray +A -W1280 -H1024 main.pov
73
74disp:
75        display main.png
76
77# ----- Dependencies ----------------------------------------------------------
78
79# compile and generate dependencies, from fped, based on
80# http://scottmcpeak.com/autodepend/autodepend.html
81
82%.o: %.c
83        $(CC) -c $(CFLAGS) $*.c -o $*.o
84        $(DEPEND) $*.c | \
85          sed -e \
86            '/^\(.*:\)\? */{p;s///;s/ *\\\?$$/ /;s/ */:\n/g;H;}' \
87            -e '$${g;p;}' -e d >$*.d; \
88          [ "$${PIPESTATUS[*]}" = "0 0" ] || { rm -f $*.d; exit 1; }
89
90-include $(OBJS:.o=.d)
91

Archive Download this file

Branches:
master



interactive