summaryrefslogtreecommitdiffstats
path: root/parecord/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'parecord/Makefile')
-rw-r--r--parecord/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/parecord/Makefile b/parecord/Makefile
index eec4ab1..05ed2fc 100644
--- a/parecord/Makefile
+++ b/parecord/Makefile
@@ -1,8 +1,16 @@
CFLAGS = -Wall -g
PULSEFLAGS = -lpulse -lpulse-simple
+SOURCES = parecord.c audio_types.c
+OBJECTS = ${SOURCES:.c=.o}
+EXECUTABLE = parecord
-all:
- @gcc $(CFLAGS) $(PULSEFLAGS) parecord.c -o parecord
+all: $(EXECUTABLE)
+
+$(EXECUTABLE): $(OBJECTS)
+ @gcc $(CFLAGS) $(PULSEFLAGS) -o $(EXECUTABLE) $(OBJECTS)
+
+$(OBJECTS):
+ @gcc -c $(CFLAGS) $(PULSEFLAGS) $(SOURCES)
clean:
- @rm -f parecord \ No newline at end of file
+ @rm -f $(OBJECTS) $(EXECUTABLE) \ No newline at end of file