From 15ac3c0f372be1c837a8af8c5d553f0fd2d6fc5a Mon Sep 17 00:00:00 2001 From: John Janus Date: Sun, 17 Sep 2017 00:26:32 +0200 Subject: [PATCH] makefile working now plus small stuff --- .gitignore | 2 ++ Makefile | 13 ++++++++----- fakeradio | Bin 14332 -> 0 bytes mp3player.c | 8 -------- simple_try.c | 2 +- 5 files changed, 11 insertions(+), 14 deletions(-) delete mode 100755 fakeradio diff --git a/.gitignore b/.gitignore index 7c1e38e..bb00e1e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *.o *swp +fakeradio + diff --git a/Makefile b/Makefile index 3669f8c..b7fa73d 100644 --- 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 index 4e75de12cd2cc743fa5d536d888d7dec80085771..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14332 zcmeHOeQ;D&mcK6@FhGC?66qm~^T4Q4Nv8vmMHhEEkU)?iS%`|e);wO)ousAH-P<30 zj98*lBQvEVE9$U2?k3~7ySO?dPGv1cQFPUHw{VIb9S2vpCJD5|*9eR#l#XV9zx&?p z+`NgiyH!)Q`v>WlFTM5FpqKhKEPJct!S6|E1;QKAH^~Q zxR@cj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QL96!%$MdkpXZ(}(qU-!^0pt)bG=j&$B++X3_miEp7t;bV|np`F=15rEM+iMVm>PDk>CUQIl zcXiavuL%a-ztPz3>1=HLB(kYPmZ zw!$e>XgeaThMTXiU$Ja4>S!Dp8Yir!%_|qxH(M*0ELq*yYPHrcYHqX&VN*^#loPlW z4i85pxsgxpnVb_Or^TDOetWlMILz$#1?xFsRU;cH1W%!NBg3=YFfLuZ@Iin9SUO{5 zO@@x?T-Qi9dd-d78d-${rdJse2B-&escQU&ActA6h0r|};};H(i1HdyZIqsI?w8~e z?JCmlOGEQy{2tn&!Oka?FKbE0-Ragj;f^Y%kx`3yMi9d02Cp&xO&52f-}I8-34|NT z92tpeMKVdN3!hsUrMYY+8i~XbRxT4QL>9^@Lp|Ej)06gWI=;9`YDmLW8HC5B$gYnX zLg}gRPJ1CFvM>iS1W~tL1%Ik2JvBz7$9?J%e=uK0PI{YWl;CK=sIE;afU{r{R}&){ zb*n53p|0v-XAJD9L9DQVi^pq#3>tNYYD6PWtfk(J40+TG3ZK>F*3kmx?j9wAnN8hU zyA3d#c3_vn5HJ}{r$jK3%tnLtiXhI`Jhi9m5w*yj=driM~UgYr1%?S+C3VC?h+;vGKB(=Gt5iaOO0EI;C-4(eAAM7O zkb4YS9Ze|5Oy9-?WXjQJwFYOR7GxetATDJX<9Q=8ilrQVox31FAE!!`W%>p({gh)vdr)yDVp3hfKdFar(YW;WS+fob9q5)sJrirw5F3^ohkGR{~t=qa5kGktw$b znZB|t2XqW_X4M_Y=>v4K6Kvkn4thkwR;b6CFl4_ac5MWbmb`ffF{Q?Y#-ch z+h~xRl)jyyl|J587Q!e^tkCY?x^nC<&*%-1D_o6Hru6;2BbT}h(D~miN1x;E8vHvT8F-~?4a@x(FUeEz diff --git a/mp3player.c b/mp3player.c index 954f141..5e91ba6 100644 --- a/mp3player.c +++ b/mp3player.c @@ -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"); -}*/ - diff --git a/simple_try.c b/simple_try.c index ddf1106..00c829a 100644 --- a/simple_try.c +++ b/simple_try.c @@ -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) { -- 2.47.0