~ubuntu-branches/ubuntu/wily/oolite/wily-proposed

« back to all changes in this revision

Viewing changes to tools/planettool/Makefile

  • Committer: Package Import Robot
  • Author(s): Nicolas Boulenguez
  • Date: 2011-12-22 00:22:39 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20111222002239-pr3upeupp4jw1psp
Tags: 1.76-1
* New upstream.
* watch: scan upstream stable releases instead of dev snapshots.
* control: use default gobjc instead of explicit 4.6.
* rules: use dpkg-dev build flags.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
EXECUTABLE = planettool
 
2
include planettool-version.inc
 
3
 
 
4
 
 
5
CC = gcc
 
6
LD = $(CC)
 
7
 
 
8
CFLAGS = -I$(FPM_PATH) -I$(OOMATHS_PATH) -DOOMATHS_STANDALONE=1 -DPLANETTOOL_VERSION="\"$(PLANETTOOL_VERSION)\"" -g -ffast-math
 
9
LDFLAGS = -lpng -lz
 
10
 
 
11
 
 
12
ifndef scheduler
 
13
        scheduler = PThreadScheduler
 
14
endif
 
15
 
 
16
ifeq ($(scheduler),PThreadScheduler)
 
17
        LDFLAGS += -lpthread
 
18
endif
 
19
 
 
20
 
 
21
ifneq ($(debug),yes)
 
22
        CFLAGS += -O3 -ftree-vectorize -funroll-loops
 
23
endif
 
24
 
 
25
 
 
26
ifeq ($(asprintf),no)
 
27
        CFLAGS += -DNO_ASPRINTF
 
28
endif
 
29
 
 
30
 
 
31
ifndef srcdir
 
32
        srcdir = .
 
33
endif
 
34
 
 
35
FPM_PATH = $(srcdir)/FloatPixMap/
 
36
 
 
37
ifndef OOMATHS_PATH
 
38
        ifneq ($(inrepo),yes)
 
39
                OOMATHS_PATH = $(srcdir)/Oolite/
 
40
        else
 
41
                OOMATHS_PATH = $(srcdir)/../../src/Core/
 
42
        endif
 
43
endif
 
44
                
 
45
 
 
46
 
 
47
vpath %.h $(FPM_PATH):$(OOMATHS_PATH)
 
48
vpath %.c $(FPM_PATH)
 
49
vpath %.m $(OOMATHS_PATH)
 
50
 
 
51
.SUFFIXES: .m
 
52
 
 
53
 
 
54
CORE_OBJECTS = main.o SphericalPixelSource.o ReadLatLong.o ReadCube.o LatLongGridGenerator.o RenderToLatLong.o RenderToCube.o RenderToMercator.o RenderToGallPeters.o MatrixTransformer.o CosineBlurFilter.o $(scheduler).o
 
55
FPM_OBJECTS = FloatPixMap.o FPMGamma.o FPMImageOperations.o FPMPNG.o FPMQuantize.o FPMRaw.o
 
56
OOMATHS_OBJECTS = OOFastArithmetic.o OOMatrix.o OOQuaternion.o OOVector.o
 
57
 
 
58
OBJECTS = $(CORE_OBJECTS) $(FPM_OBJECTS) $(OOMATHS_OBJECTS)
 
59
 
 
60
 
 
61
planettool: $(OBJECTS)
 
62
        $(LD) -o $(EXECUTABLE) $(LDFLAGS) $(OBJECTS)
 
63
 
 
64
 
 
65
# Rule to compile Objective-C maths files as C.
 
66
.m.o:
 
67
        $(CC) -c -x c $(CFLAGS) -o $@ $<
 
68
 
 
69
 
 
70
# Core dependencies.
 
71
SphericalPixelSource.h: FloatPixMap.h
 
72
LatLongGridGenerator.h ReadLatLong.h ReadCube.h MatrixTransformer.h RenderToLatLong.h RenderToCube.h PlanetToolScheduler.h: SphericalPixelSource.h
 
73
 
 
74
main.o: FPMPNG.h LatLongGridGenerator.h ReadLatLong.h MatrixTransformer.h RenderToLatLong.h RenderToCube.h
 
75
 
 
76
SphericalPixelSource.o: SphericalPixelSource.h
 
77
ReadLatLong.o: ReadLatLong.h FPMImageOperations.h PlanetToolScheduler.h
 
78
ReadCube.o: ReadCube.h FPMImageOperations.h PlanetToolScheduler.h
 
79
RenderToLatLong.o: RenderToLatLong.h FPMImageOperations.h
 
80
RenderToMercator.o: RenderToMercator.h FPMImageOperations.h
 
81
RenderToGallPeters.o: RenderToGallPeters.h FPMImageOperations.h
 
82
LatLongGridGenerator.o: LatLongGridGenerator.h
 
83
RenderToCube.o: RenderToCube.h FPMImageOperations.h
 
84
MatrixTransformer.o: MatrixTransformer.h
 
85
CosineBlurFilter.o: CosineBlurFilter.h
 
86
SerialScheduler.o PListScheduler.o: PlanetToolScheduler.h
 
87
 
 
88
 
 
89
# FloatPixMap dependencies.
 
90
FloatPixMap.h FPMVector.h: FPMBasics.h
 
91
FPMPNG.h FPMGamma.h FPMImageOperations.h FPMQuantize.h FPMRaw.h : FloatPixMap.h
 
92
FPMPNG.h : FPMGamma.h FPMQuantize.h
 
93
 
 
94
FloatPixMap.o: FloatPixMap.h
 
95
FPMGamma.o: FPMGamma.h FPMImageOperations.h
 
96
FPMImageOperations.o: FPMImageOperations.h FPMVector.h
 
97
FPMPNG.o: FPMPNG.h
 
98
FPMQuantize.o: FPMQuantize.h FPMImageOperations.h
 
99
FPMRaw.o: FPMRaw.h FPMImageOperations.h
 
100
 
 
101
 
 
102
 
 
103
.PHONY: clean
 
104
clean:
 
105
        -rm -f *.o $(EXECUTABLE)