From: Harvie Date: Mon, 1 Nov 2010 03:12:20 +0000 (+0100) Subject: Ghetto soundsystem: new flexible Makefile X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=867995e41f7493ad93af3f7c63cb5d24c91673bf;p=mirrors%2FPrograms.git Ghetto soundsystem: new flexible Makefile --- diff --git a/c/ghetto-sound-system/Makefile b/c/ghetto-sound-system/Makefile index 32a8e15..71622c2 100644 --- a/c/ghetto-sound-system/Makefile +++ b/c/ghetto-sound-system/Makefile @@ -1,8 +1,22 @@ -#CFLAGS=-lSDL_sound -lSDL -lSDL_mixer -CFLAGS+=`sdl-config --cflags --libs` -lSDL_mixer -CFLAGS+=-lm +sdl_BIN=sampler synth +alsa_BIN=beatdetect + +#sdl_CFLAGS+=-lSDL_sound -lSDL -lSDL_mixer +sdl_CFLAGS+=$(shell sdl-config --cflags --libs) -lSDL_mixer +sdl_CFLAGS+=-lm #synth +alsa_CFLAGS+=-lasound + +.PHONY: all clean sdl alsa go +all: sdl alsa +clean: + rm $(sdl_BIN) $(alsa_BIN) + +sdl: + $(MAKE) CFLAGS+="$(sdl_CFLAGS)" $(sdl_BIN) + +alsa: + $(MAKE) CFLAGS="$(alsa_CFLAGS)" $(alsa_BIN) + -.PHONY: all go -all: sampler synth go: sampler ./$? samples/*/* 2>/dev/null