Ghetto soundsystem: new flexible Makefile
authorHarvie <tomas@mudrunka.cz>
Mon, 1 Nov 2010 03:12:20 +0000 (04:12 +0100)
committerHarvie <tomas@mudrunka.cz>
Mon, 1 Nov 2010 03:12:20 +0000 (04:12 +0100)
c/ghetto-sound-system/Makefile

index 32a8e1527ba8150231a62e2612f4f65b2028c22c..71622c2a5d80422bd00c2dc2cf4d5ffad414901c 100644 (file)
@@ -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
This page took 0.11264 seconds and 4 git commands to generate.