CC=gcc # For debug #CFLAGS=-W -Wall -Werror -Wno-error=unused-parameter -g CFLAGS=-W -Wall -Wno-error=unused-parameter -g #LDFLAGS=-Werror -g # For release #CFLAGS=-W -Wall -Werror -Wno-unused-parameter -O2 LDFLAGS=-export-dynamic -Werror EXEC=instru2light CFLAGS+=$(shell pkg-config --cflags gtk+-2.0 gthread-2.0 libpulse) # Maths for FFT related code, libftdi is the driver for USB2DMX module LDFLAGS+=-lm -lftdi # -lrt for nanosleep but create many tiny buffers from PulseAudio #LDFLAGS+=-lm -lftdi -lrt LDFLAGS+=$(shell pkg-config --libs gtk+-2.0 gthread-2.0 libpulse) SRC= $(wildcard *.c) OBJ= $(SRC:.c=.o) all: $(EXEC) $(EXEC): $(OBJ) $(CC) -o $@ $^ $(LDFLAGS) %.o: %.c $(CC) -o $@ -c $< $(CFLAGS) .PHONY: clean mrproper clean: rm *.o mrproper: clean rm $(EXEC)