CC = gcc
CFLAGS = -std=gnu11 -Wall
LDFLAGS = -lpthread -lao -lmpg123 -lwiringPi
-fakeradio: main.o mp3player.o
+fakeradio : mp3player.o main.o
$(CC) $(CFLAGS) -o fakeradio main.o mp3player.o $(LDFLAGS)
-main.o: simple_try.c
- $(CC) $(CFLAGS) -o main.o simple_try.c $(LDFLAGS)
+main.o : simple_try.c
+ $(CC) $(CFLAGS) -c -o main.o simple_try.c $(LDFLAGS)
-mp3player.o: mp3player.h mp3player.c
- $(CC) $(CFLAGS) -o mp3player.o mp3player.c $(LDFLAGS)
+mp3player.o : mp3player.h mp3player.c
+ $(CC) $(CFLAGS) -c -o mp3player.o mp3player.c $(LDFLAGS)
+.PHONY : clean
+clean :
+ rm main.o mp3player.o fakeradio
}
-/*int main (int argc, char** argv)
-{
- pthread_t thread = startPlayThread("platt01.mp3");
- void* status;
- pthread_join(thread, status);
- //playFunc("platt01.mp3");
-}*/
-
pthread_cond_wait(wakeup, mut);
if (playThread) {
- printf("playing");
pthread_cancel(playThread);
}
digitalWrite(PWRLED, HIGH);
digitalWrite(CHNL1LED, HIGH);
digitalWrite(CHNL2LED, HIGH);
+ chnl1=true;
} else {
digitalWrite(PWRLED, LOW);
if (chnl1) {