CC = gcc
-CFLAGS = -std=gnu11 -Wall -g
+CFLAGS = -std=gnu11 -Wall -O2
LDFLAGS = -lpthread -lao -lmpg123 -lwiringPi
-fakeradio : mp3player.o main.o
- $(CC) $(CFLAGS) -o fakeradio main.o mp3player.o $(LDFLAGS)
+fakeradio : mp3player.o main.o fifo.o
+ $(CC) $(CFLAGS) -o fakeradio main.o mp3player.o fifo.o $(LDFLAGS)
main.o : simple_try.c
$(CC) $(CFLAGS) -c -o main.o simple_try.c $(LDFLAGS)
-mp3player.o : mp3player.h mp3player.c
+mp3player.o : mp3player.h mp3player.c fifo.h
$(CC) $(CFLAGS) -c -o mp3player.o mp3player.c $(LDFLAGS)
+fifo.o : fifo.c fifo.h
+ $(CC) $(CFLAGS) -c -o fifo.o fifo.c $(LDFLAGS)
+
.PHONY : clean
clean :
- rm main.o mp3player.o fakeradio
+ rm main.o mp3player.o fifo.o fakeradio