Used Tahoma font, integrates better with the installer UI
[xiph/unicode.git] / spectrum / Makefile
bloba4464f12a4712af359958659823ab3c7eb3137fd
1 # Fuck Automake
2 # Fuck the horse it rode in on
3 # and Fuck its little dog Libtool too
6 # Use the below line to build for PowerPC
7 # The PPC build *must* use -maltivec, even if the target is a non-altivec machine
9 #ADD_DEF= -DUGLY_IEEE754_FLOAT32_HACK=1 -maltivec -mcpu=7400
11 # use the below for x86 and most other platforms where 'float' is 32 bit IEEE754
13 #ADD_DEF= -DUGLY_IEEE754_FLOAT32_HACK=1
15 # use the below for anything without IEE754 floats (eg, VAX)
17 # ADD_DEF=
20 CC=gcc
21 LD=gcc
22 INSTALL=install
23 PREFIX=/usr/local
24 BINDIR=$(PREFIX)/bin
25 ETCDIR=/etc/spectrum
26 MANDIR=$(PREFIX)/man
28 SRC = main.c process.c panel.c plot.c
29 OBJ = main.o process.o panel.o plot.o
30 GCF = -DETCDIR=\\\"$(ETCDIR)\\\" `pkg-config --cflags gtk+-2.0` -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
32 all:
33 $(MAKE) target CFLAGS="-O3 -ffast-math -fomit-frame-pointer $(GCF) $(ADD_DEF)"
35 debug:
36 $(MAKE) target CFLAGS="-g -Wall -W -Wno-unused-parameter -D__NO_MATH_INLINES $(GCF) $(ADD_DEF)"
38 profile:
39 $(MAKE) target CFLAGS="-pg -g -O3 -ffast-math $(GCF) $(ADD_DEF)" LIBS="-lgprof-helper "
41 clean:
42 rm -f $(OBJ) *.d *.d.* gmon.out spectrum
44 distclean: clean
45 rm -f spectrum-wisdomrc
47 %.d: %.c
48 $(CC) -M $(CFLAGS) $< > $@.$$$$; sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; rm -f $@.$$$$
50 spectrum-wisdomrc:
51 fftwf-wisdom -v -o spectrum-wisdomrc \
52 rif8192 rib8192
54 ifeq ($(MAKECMDGOALS),target)
55 include $(SRC:.c=.d)
56 endif
58 target: $(OBJ) spectrum-wisdomrc
59 ./touch-version
60 $(LD) $(OBJ) $(CFLAGS) -o spectrum $(LIBS) `pkg-config --libs gtk+-2.0` -lpthread -lfftw3f -lm
62 install: target
63 $(INSTALL) -d -m 0755 $(BINDIR)
64 $(INSTALL) -m 0755 spectrum $(BINDIR)
65 $(INSTALL) -d -m 0755 $(ETCDIR)
66 $(INSTALL) -m 0644 spectrum-gtkrc $(ETCDIR)
67 $(INSTALL) -m 0644 spectrum-wisdomrc $(ETCDIR)
68 # $(INSTALL) -d -m 0755 $(MANDIR)
69 # $(INSTALL) -d -m 0755 $(MANDIR)/man1
70 # $(INSTALL) -m 0644 spectrum.1 $(MANDIR)/man1