From 34614a2918e717762578f237e55656a9c3dc99eb Mon Sep 17 00:00:00 2001 From: Raspbeguy Date: Wed, 9 Apr 2014 14:55:03 +0200 Subject: [PATCH] =?UTF-8?q?=C3=87a=20compile=20et=20=C3=A7a=20plante=20pas?= =?UTF-8?q?.=20Mais=20=C3=A7a=20lit=20pas=20encore.=20Sous=20linux,=20bido?= =?UTF-8?q?uillez=20le=20makefile.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/GUI/ponytracker.glade | 2 +- sources/Makefile | 11 ++++++----- sources/lecture/lecture.h | 4 ++-- sources/main.c | 30 +++++++++++++++--------------- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/sources/GUI/ponytracker.glade b/sources/GUI/ponytracker.glade index 1b694c1..962c73b 100644 --- a/sources/GUI/ponytracker.glade +++ b/sources/GUI/ponytracker.glade @@ -1660,7 +1660,7 @@ True True True - + True diff --git a/sources/Makefile b/sources/Makefile index 0d99efc..621a422 100644 --- a/sources/Makefile +++ b/sources/Makefile @@ -1,19 +1,20 @@ all : ponytracker clean ponytracker : main.o lecture.o motifs.o melodie.o - gcc -L/opt/local/lib -lsdl -lsdl_mixer -lsdlmain -Wall main.o lecture.o motifs.o melodie.o -o ponytracker `pkg-config --cflags --libs gtk+-3.0 gmodule-2.0` +# gcc -std=c99 -L=/home/ebrunet/temp/SDL-2.0.3-8621/installation/lib -lsdl2 -lsdl_mixer -lsdlmain -Wall main.o lecture.o motifs.o melodie.o -o ponytracker `pkg-config --cflags --libs gtk+-3.0 gmodule-2.0` + gcc -std=c99 -L/opt/local/lib -Wall main.o lecture.o motifs.o melodie.o -o ponytracker `pkg-config --cflags --libs gtk+-3.0 gmodule-2.0` -lSDL2 -lSDL2main -lSDL2_mixer main.o : main.c - gcc -L/opt/local/lib -lsdl -lsdl_mixer -lsdlmain -Wall -c main.c `pkg-config --cflags --libs gtk+-3.0 gmodule-2.0` + gcc -std=c99 -I/opt/local/include -Wall -c main.c `pkg-config --cflags --libs gtk+-3.0 gmodule-2.0` motifs.o : motifs/motifs.c motifs/motifs.h - gcc -Wall -c motifs/motifs.c + gcc -std=c99 -I/opt/local/include -Wall -c motifs/motifs.c melodie.o : melodie/melodie.c melodie/melodie.h - gcc -Wall -c melodie/melodie.c + gcc -std=c99 -I/opt/local/include -Wall -c melodie/melodie.c lecture.o : lecture/lecture.c lecture/lecture.h - gcc -L/opt/local/lib -lsdl -lsdl_mixer -lsdlmain -Wall -c lecture/lecture.c + gcc -std=c99 -I/opt/local/include -Wall -c lecture/lecture.c clean : rm -f *.o diff --git a/sources/lecture/lecture.h b/sources/lecture/lecture.h index 6c282ff..8678c48 100644 --- a/sources/lecture/lecture.h +++ b/sources/lecture/lecture.h @@ -5,8 +5,8 @@ #include "../melodie/melodie.h" // #include "../instruments/instrument.h" -#include "/opt/local/include/SDL/SDL.h" -#include "/opt/local/include/SDL/SDL_mixer.h" +#include +#include #include #include diff --git a/sources/main.c b/sources/main.c index 2a2df81..0b3133d 100644 --- a/sources/main.c +++ b/sources/main.c @@ -5,8 +5,8 @@ #include "motifs/motifs.h" #include "melodie/melodie.h" #include "lecture/lecture.h" -#include "/opt/local/include/SDL/SDL.h" -#include "/opt/local/include/SDL/SDL_mixer.h" +#include +#include #define DEF_NBR_TMP 16 #define MAX_PATTERNS 256 @@ -29,30 +29,19 @@ void debut(Motif* melodie[], Motif* liste, int nbrPortees){ ajouterMotif(&liste, DEF_NBR_TMP, nbrPortees); Motif* m = liste; definirNote(m,0,4,5); - definirNote(m,1,2,9); + definirNote(m,0,2,9); ajouterMotif(&liste, DEF_NBR_TMP, nbrPortees); Motif* n = liste; definirNote(n,0,10,3); - definirNote(n,1,6,7); + definirNote(n,0,6,7); ajouterMotifVirtuel(melodie,0,m); ajouterMotifVirtuel(melodie,1,n); ajouterMotifVirtuel(melodie,2,m); ajouterMotifVirtuel(melodie,3,n); } -/*void lecture () -{ - gtk_main_quit(); -}*/ - int main( int argc, char *argv[] ){ - Motif* melodie[MAX_PATTERNS] = {NULL}; - Motif* liste = NULL; - int nbrPortees = 2; - courant = 0; - taille = 0; - debut(melodie, liste, nbrPortees); //lecture(nbrPortee, melodie); // insérer code GTK ici @@ -123,3 +112,14 @@ void fenetreMotif ( int argc, char *argv[] ) gtk_widget_show_all (maFenetreMotif); } + +void lancerLecture () +{ + Motif* melodie[MAX_PATTERNS] = {NULL}; + Motif* liste = NULL; + int nbrPortees = 1; + courant = 0; + taille = 0; + debut(melodie, liste, nbrPortees); + //lecture(nbrPortees,melodie);*/ +}