Add code for generating new levels of detail to d3::scene::ref_weights.
[Ale.git] / Makefile
blob638c3609527dff7d448ac1af2898b762e1fb2bb9
1 # Copyright 2002, 2003 David Hilvert <dhilvert@auricle.dyndns.org>,
2 # <dhilvert@ugcs.caltech.edu>
4 # This file is part of the Anti-Lamenessing Engine.
6 # The Anti-Lamenessing Engine is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # The Anti-Lamenessing Engine is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Anti-Lamenessing Engine; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 # Compile options (defaults)
24 IMAGEMAGICK=0
25 FFTW=0
26 DEBUG=0
27 POSIX=1
28 IOCTL=0
29 COLORS=SINGLE
30 COORDINATES=SINGLE
31 OPTIMIZATIONS=1
34 # Variable that is false when ImageMagick is not being used
37 use_imagemagick:=$(subst 0,,$(IMAGEMAGICK))
40 # Compiler flags
43 DEBUG_CFLAGS:=$(if $(subst 0,,$(DEBUG)),-DDEBUG,-DNDEBUG)
44 IMAGEMAGICK_CFLAGS:=$(if $(use_imagemagick),-DUSE_MAGICK $(shell Magick-config --cflags --cppflags),)
45 IMAGEMAGICK_LDFLAGS:=$(if $(use_imagemagick),$(shell Magick-config --ldflags --libs),)
46 FFTW_CFLAGS:=$(if $(subst 0,,$(FFTW)),-DUSE_FFTW,)
47 POSIX_CFLAGS:=$(if $(subst 0,,$(POSIX)),-DUSE_UNIX,)
48 IOCTL_CFLAGS:=$(if $(subst 0,,$(IOCTL)),-DUSE_IOCTL,)
49 PRECISION_CFLAGS:=$(if $(subst SINGLE,,$(COLORS)),,-DALE_COLORS=SINGLE)\
50 $(if $(subst DOUBLE,,$(COLORS)),,-DALE_COLORS=DOUBLE)\
51 $(if $(subst HALF,,$(COLORS)),,-DALE_COLORS=HALF)\
52 $(if $(subst SINGLE,,$(COORDINATES)),,-DALE_COORDINATES=SINGLE)\
53 $(if $(subst DOUBLE,,$(COORDINATES)),,-DALE_COORDINATES=DOUBLE)
54 FFTW_LDFLAGS:=$(if $(subst 0,,$(FFTW)),-lfftw3,)
55 OPTIMIZATION_CFLAGS:=-DOPTIMIZATIONS=$(OPTIMIZATIONS)
57 CFLAGS:= $(POSIX_CFLAGS) $(DEBUG_CFLAGS) $(FFTW_CFLAGS) $(PRECISION_CFLAGS) \
58 $(if $(use_imagemagick),$(IMAGEMAGICK_CFLAGS),-Wall -O2) \
59 $(OPTIMIZATION_CFLAGS) $(IOCTL_CFLAGS)
61 LDFLAGS:=$(if $(use_imagemagick),$(IMAGEMAGICK_LDFLAGS)) $(FFTW_LDFLAGS) -lm
64 # We're using 'ale-phony' because we're using make for configuration,
65 # and we want to make sure that the output is updated if the configuration
66 # changes.
68 # XXX: is there a better way to do this?
71 all: ale-phony
73 # ale: ale-phony
74 # @echo "Finished making ALE."
76 clean:
77 rm -f ale
78 rm -f ale.exe
79 rm -f ale.sum ale.log
80 find testsuite -name "*temp.*" | xargs rm -rf
81 find testsuite -name "*.output.*" | xargs rm -rf
83 ale-phony: ale.cc ui/ui.cc d2.cc *.h d2/*.h d2/render/*.h d2/render/psf/*.h d3.cc d3/*.h
84 $(CXX) -o ale $(CFLAGS) ale.cc ui/ui.cc d3.cc d2.cc $(LDFLAGS)
86 # The following approach to building a Windows binary is probably very
87 # dependent on the host platform configuration. The above target may be a
88 # better place to start for Windows users.
90 ale.exe: ale.cc ui/ui.cc d2.cc *.h d2/*.h d2/render/*.h d2/render/psf/*.h d3.cc d3/*.h
91 i586-mingw32msvc-g++ -Wall $(OPTIMIZATION_CFLAGS) $(PRECISION_CFLAGS) $(DEBUG_CFLAGS) -o ale.exe -O2 ale.cc ui/ui.cc d3.cc d2.cc -lm
94 # The following rules may require additional software to be installed.
97 ALE=./ale
99 check: # $(ALE)
100 runtest --tool ale ALE=$(ALE) --srcdir ./testsuite