Makefile 1.82 KB
Newer Older
Monty Montgomery's avatar
 
Monty Montgomery committed
1 2 3 4
# Fuck Automake
# Fuck the horse it rode in on
# and Fuck its little dog Libtool too

5 6
ADD_DEF= -DUGLY_IEEE754_FLOAT32_HACK=1
CC=gcc 
Monty Montgomery's avatar
 
Monty Montgomery committed
7
LD=gcc
Monty Montgomery's avatar
 
Monty Montgomery committed
8 9 10 11 12
INSTALL=install
PREFIX=/usr/local
BINDIR=$PREFIX/bin
ETCDIR=/etc
MANDIR=$PREFIX/man
Monty Montgomery's avatar
 
Monty Montgomery committed
13

Monty Montgomery's avatar
 
Monty Montgomery committed
14
SRC = main.c mainpanel.c multibar.c readout.c input.c output.c clippanel.c \
Monty Montgomery's avatar
 
Monty Montgomery committed
15
	declip.c reconstruct.c multicompand.c windowbutton.c subpanel.c \
Monty Montgomery's avatar
 
Monty Montgomery committed
16
	feedback.c freq.c eq.c eqpanel.c compandpanel.c subband.c lpc.c \
17 18
	bessel.c suppresspanel.c suppress.c singlecomp.c singlepanel.c \
	limit.c limitpanel.c
Monty Montgomery's avatar
 
Monty Montgomery committed
19
OBJ = main.o mainpanel.o multibar.o readout.o input.o output.o clippanel.o \
Monty Montgomery's avatar
 
Monty Montgomery committed
20
	declip.o reconstruct.o multicompand.o windowbutton.o subpanel.o \
Monty Montgomery's avatar
 
Monty Montgomery committed
21
	feedback.o freq.o eq.o eqpanel.o compandpanel.o subband.o lpc.o \
22 23
	bessel.o suppresspanel.o suppress.o singlecomp.o singlepanel.o \
	limit.o limitpanel.o
Monty Montgomery's avatar
 
Monty Montgomery committed
24
GCF = `pkg-config --cflags gtk+-2.0` -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED
Monty Montgomery's avatar
 
Monty Montgomery committed
25 26

all:	
27
	$(MAKE) target CFLAGS="-O3 -ffast-math -fomit-frame-pointer $(GCF) $(ADD_DEF)"
Monty Montgomery's avatar
 
Monty Montgomery committed
28 29

debug:
30
	$(MAKE) target CFLAGS="-g -Wall -W -Wno-unused-parameter -D__NO_MATH_INLINES $(GCF) $(ADD_DEF)"
Monty Montgomery's avatar
 
Monty Montgomery committed
31 32

profile:
33
	$(MAKE) target CFLAGS="-pg -g -O3 -ffast-math $(GCF) $(ADD_DEF)" LIBS="-lgprof-helper"
Monty Montgomery's avatar
 
Monty Montgomery committed
34 35

clean:
Monty Montgomery's avatar
 
Monty Montgomery committed
36
	rm -f $(OBJ) *.d gmon.out
Monty Montgomery's avatar
 
Monty Montgomery committed
37 38 39 40

%.d: %.c
	$(CC) -M $(GCF) $< > $@.$$$$; sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; rm -f $@.$$$$

Monty Montgomery's avatar
 
Monty Montgomery committed
41
ifneq ($(MAKECMDGOALS),clean)
Monty Montgomery's avatar
 
Monty Montgomery committed
42
include $(SRC:.c=.d)
Monty Montgomery's avatar
 
Monty Montgomery committed
43
endif
Monty Montgomery's avatar
 
Monty Montgomery committed
44

Monty Montgomery's avatar
 
Monty Montgomery committed
45
target: $(OBJ) 
Monty Montgomery's avatar
 
Monty Montgomery committed
46
	./touch-version
Monty Montgomery's avatar
 
Monty Montgomery committed
47
	$(LD) $(OBJ) $(CFLAGS) -o postfish $(LIBS) `pkg-config --libs gtk+-2.0` -lpthread -lfftw3f -lm
Monty Montgomery's avatar
 
Monty Montgomery committed
48

Monty Montgomery's avatar
 
Monty Montgomery committed
49 50 51 52 53 54 55 56
install:
	$(INSTALL) -d -m 0755 $(BINDIR)
	$(INSTALL) -m 0755 postfish $(BINDIR)
	$(INSTALL) -d -m 0755 $(ETCDIR)
	$(INSTALL) -m 0644 postfish-gtkrc $(ETCDIR)
#	$(INSTALL) -d -m 0755 $(MANDIR)
#	$(INSTALL) -d -m 0755 $(MANDIR)/man1
#	$(INSTALL) -m 0644 postfish.1 $(MANDIR)/man1