]> Johnzone git - FakeRadio.git/commitdiff
makefile working now plus small stuff
authorJohn Janus <mail@johnzone.org>
Sat, 16 Sep 2017 22:26:32 +0000 (00:26 +0200)
committerJohn Janus <mail@johnzone.org>
Sat, 16 Sep 2017 22:26:32 +0000 (00:26 +0200)
.gitignore
Makefile
fakeradio [deleted file]
mp3player.c
simple_try.c

index 7c1e38ed6c3eeadfa87f6c4230b40e8ce64f70ff..bb00e1e6235ca5dc3b234cb1f6ce34312fd0120c 100644 (file)
@@ -1,2 +1,4 @@
 *.o
 *swp
+fakeradio
+
index 3669f8cce5a4629386a42a8c785d144e31ab8a72..b7fa73d46aaf768d19f5023fefcbfebd98490dcc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,15 @@
 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
diff --git a/fakeradio b/fakeradio
deleted file mode 100755 (executable)
index 4e75de1..0000000
Binary files a/fakeradio and /dev/null differ
index 954f141b21ea9fd138a978ab56def4f108fda679..5e91ba62eedda5e24a4ea90f178e15501045e131 100644 (file)
@@ -58,11 +58,3 @@ void* playFunc(void* file)
     
 }
 
-/*int main (int argc, char** argv)
-{
-    pthread_t thread = startPlayThread("platt01.mp3");
-    void* status;
-    pthread_join(thread, status);
-    //playFunc("platt01.mp3");
-}*/
-
index ddf1106ab670fb4dad5a5ed893136db3c62e7d52..00c829a49c272b7fcffd6fd8721c760aee38c705 100644 (file)
@@ -91,7 +91,6 @@ int main(void) {
         pthread_cond_wait(wakeup, mut);
         
         if (playThread) {
-            printf("playing");
             pthread_cancel(playThread);
         }
         
@@ -99,6 +98,7 @@ int main(void) {
             digitalWrite(PWRLED, HIGH);
             digitalWrite(CHNL1LED, HIGH);
             digitalWrite(CHNL2LED, HIGH);
+            chnl1=true;
         } else {
             digitalWrite(PWRLED, LOW);
             if (chnl1) {