diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a557245 --- /dev/null +++ b/Makefile @@ -0,0 +1,73 @@ +.PHONY : all librtaputil clean purge help install install-librtaputil install-loc-bts install-loc-client uninstall uninstall-librtaputil uninstall-loc-bts uninstall-loc-client + +## Compilation ## + +all : librtaputil loc-bts loc-mobile + +librtaputil : + @cd librtaputil && make + +loc-bts : librtaputil + @cd loc-bts && make + +loc-mobile : librtaputil + @cd loc-mobile && make + +## Installation ## + +install : install-librtaputil install-loc-bts install-loc-client + +install-librtaputil : librtaputil + @cd librtaputil && make install + +install-loc-bts : loc-bts + @cd loc-bts && make install + +install-loc-mobile : loc-mobile + @cd loc-mobile && make install + +## Désinstallation ## + +uninstall : uninstall-librtaputil uninstall-loc-bts uninstall-loc-client + +uninstall-librtaputil : + @cd librtaputil && make uninstall + +uninstall-loc-bts : + @cd loc-bts && make uninstall + +uninstall-loc-mobile : + @cd loc-mobile && make uninstall + +## Nettoyage ## + +clean : + @cd librtaputil && make clean + @cd loc-bts && make clean + @cd loc-mobile && make clean + +purge : + @cd librtaputil && make purge + @cd loc-bts && make purge + @cd loc-mobile && make purge + +## Aide ## + +help : + @echo "Bibliothèques nécessaires à la compilation :\n\ + aucune\n\ + \n\ + Cibles possibles :\n\ + all (cible par défaut) : Compile tous les modules.\n\ + : Compile uniquement le module (et ses dépendances).\n\ + \n\ + install : Installe tous les modules.\n\ + install- : Installe uniquement le module (et ses dépendances).\n\ + \n\ + uninstall : Désinstalle tous les modules.\n\ + uninstall- : Désinstalle uniquement le module (et ses dépendances).\n\ + \n\ + clean : Supprime les fichiers temporaires.\n\ + purge : Supprime le résultat de la compilation.\n\ + \n\ + Note : l'installation se fait dans l'arborescence /usr/local. Modifiez la variable PREFIX de chaque Makefile pour changer ce comportement." diff --git a/loc-bts/code/librtaputil/Makefile b/librtaputil/Makefile similarity index 100% rename from loc-bts/code/librtaputil/Makefile rename to librtaputil/Makefile diff --git a/loc-bts/code/librtaputil/librtaputil.c b/librtaputil/librtaputil.c similarity index 100% rename from loc-bts/code/librtaputil/librtaputil.c rename to librtaputil/librtaputil.c diff --git a/loc-bts/code/librtaputil/rtaputil.h b/librtaputil/rtaputil.h similarity index 100% rename from loc-bts/code/librtaputil/rtaputil.h rename to librtaputil/rtaputil.h diff --git a/loc-bts/code/Makefile b/loc-bts/Makefile similarity index 58% rename from loc-bts/code/Makefile rename to loc-bts/Makefile index b1ab5aa..da190a9 100644 --- a/loc-bts/code/Makefile +++ b/loc-bts/Makefile @@ -1,59 +1,58 @@ -.PHONY : all librtapanalyser librtaputil rtapaggregate ap client clean purge help install install-librtaputil install-rtapaggregate install-ap install-client +.PHONY : all rtapaggregate ap client clean purge help install install-rtapaggregate install-ap install-client uninstall uninstall-rtapaggregate uninstall-ap uninstall-client -all : librtaputil rtapaggregate ap client +## Compilation ## -install : install-librtaputil install-rtapaggregate install-ap install-client +all : rtapaggregate ap client -uninstall : uninstall-librtaputil uninstall-rtapaggregate uninstall-ap uninstall-client - -librtaputil : - @cd librtaputil && make - -rtapaggregate : librtaputil +rtapaggregate : @cd rtapaggregate && make -ap : librtaputil +ap : @cd ap && make -client : librtaputil +client : @cd client && make -install-librtaputil : librtaputil - @cd librtaputil && make install +## Installation ## -install-rtapaggregate : rtapaggregate install-librtaputil +install : install-rtapaggregate install-ap install-client + +install-rtapaggregate : rtapaggregate @cd rtapaggregate && make install -install-ap : ap install-librtaputil +install-ap : ap @cd ap && make install -install-client : client install-librtaputil +install-client : client @cd client && make install -uninstall-librtaputil : librtaputil - @cd librtaputil && make uninstall +## Désinstallation ## -uninstall-rtapaggregate : rtapaggregate +uninstall : uninstall-rtapaggregate uninstall-ap uninstall-client + +uninstall-rtapaggregate : @cd rtapaggregate && make uninstall -uninstall-ap : ap +uninstall-ap : @cd ap && make uninstall -uninstall-client : client +uninstall-client : @cd client && make uninstall +## Nettoyage ## + clean : @cd rtapaggregate && make clean - @cd librtaputil && make clean @cd ap && make clean @cd client && make clean purge : @cd rtapaggregate && make purge - @cd librtaputil && make purge @cd ap && make purge @cd client && make purge +## Aide ## + help : @echo "Bibliothèques nécessaires à la compilation :\n\ libpcap0.8-dev\n\ diff --git a/loc-bts/code/ap/Makefile b/loc-bts/ap/Makefile similarity index 96% rename from loc-bts/code/ap/Makefile rename to loc-bts/ap/Makefile index 283bde6..02af0bb 100644 --- a/loc-bts/code/ap/Makefile +++ b/loc-bts/ap/Makefile @@ -21,7 +21,7 @@ CFLAGS=-O2 -W -Wall -Wstrict-prototypes -O -I. DEPFLAGS=-MMD XCFLAGS=$(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS) PICFLAG=-fPIC -LIBS=-lm -lpcap ../librtaputil/librtaputil.so.1.0 +LIBS=-lm -lpcap ../../librtaputil/librtaputil.so.1.0 ## Cibles de compilation standard ## diff --git a/loc-bts/code/ap/ap.h b/loc-bts/ap/ap.h similarity index 95% rename from loc-bts/code/ap/ap.h rename to loc-bts/ap/ap.h index e21f681..93b205e 100644 --- a/loc-bts/code/ap/ap.h +++ b/loc-bts/ap/ap.h @@ -6,7 +6,7 @@ #define _AP_H -#include "../librtaputil/rtaputil.h" +#include "../../librtaputil/rtaputil.h" #include // Pour la fonction get_mac_addr() : diff --git a/loc-bts/code/ap/apd.c b/loc-bts/ap/apd.c similarity index 100% rename from loc-bts/code/ap/apd.c rename to loc-bts/ap/apd.c diff --git a/loc-bts/code/client/Makefile b/loc-bts/client/Makefile similarity index 97% rename from loc-bts/code/client/Makefile rename to loc-bts/client/Makefile index c54798e..7775883 100644 --- a/loc-bts/code/client/Makefile +++ b/loc-bts/client/Makefile @@ -21,7 +21,7 @@ CFLAGS=-O2 -W -Wall -Wstrict-prototypes -O -I. DEPFLAGS=-MMD XCFLAGS=$(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS) PICFLAG=-fPIC -LIBS=../librtaputil/librtaputil.so.1.0 +LIBS=../../librtaputil/librtaputil.so.1.0 ## Cibles de compilation standard ## diff --git a/loc-bts/code/client/locclient.c b/loc-bts/client/locclient.c similarity index 99% rename from loc-bts/code/client/locclient.c rename to loc-bts/client/locclient.c index 537facc..ad813a2 100644 --- a/loc-bts/code/client/locclient.c +++ b/loc-bts/client/locclient.c @@ -3,7 +3,7 @@ */ -#include "../librtaputil/rtaputil.h" +#include "../../librtaputil/rtaputil.h" //#define DEBUG diff --git a/loc-bts/code/rtapaggregate/Makefile b/loc-bts/rtapaggregate/Makefile similarity index 96% rename from loc-bts/code/rtapaggregate/Makefile rename to loc-bts/rtapaggregate/Makefile index 3bb4468..fd57eb8 100644 --- a/loc-bts/code/rtapaggregate/Makefile +++ b/loc-bts/rtapaggregate/Makefile @@ -21,7 +21,7 @@ CFLAGS=-O2 -W -Wall -Wstrict-prototypes -O -I. DEPFLAGS=-MMD XCFLAGS=$(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS) PICFLAG=-fPIC -LIBS=-lpthread ../librtaputil/librtaputil.so.1.0 +LIBS=-lpthread ../../librtaputil/librtaputil.so.1.0 ## Cibles de compilation standard ## diff --git a/loc-bts/code/rtapaggregate/rtapaggregate.h b/loc-bts/rtapaggregate/rtapaggregate.h similarity index 98% rename from loc-bts/code/rtapaggregate/rtapaggregate.h rename to loc-bts/rtapaggregate/rtapaggregate.h index 10e87a2..790e6c0 100644 --- a/loc-bts/code/rtapaggregate/rtapaggregate.h +++ b/loc-bts/rtapaggregate/rtapaggregate.h @@ -6,7 +6,7 @@ #define _RTAPAGGREGATE_H -#include "../librtaputil/rtaputil.h" +#include "../../librtaputil/rtaputil.h" #include #include #include diff --git a/loc-bts/code/rtapaggregate/rtapaggregated.c b/loc-bts/rtapaggregate/rtapaggregated.c similarity index 100% rename from loc-bts/code/rtapaggregate/rtapaggregated.c rename to loc-bts/rtapaggregate/rtapaggregated.c diff --git a/loc-mobile/Makefile b/loc-mobile/Makefile new file mode 100644 index 0000000..0a94db5 --- /dev/null +++ b/loc-mobile/Makefile @@ -0,0 +1,52 @@ +.PHONY : all librtapscanmob clean purge help install install-librtapscanmob uninstall uninstall-librtapscanmob + +## Compilation ## + +all : librtapscanmob + +librtapscanmob : + @cd librtapscanmob && make + +## Installation ## + +install : install-librtapscanmob + +install-librtapscanmob : librtapscanmob + @cd librtapscanmob && make install + +## Désinstallation ## + +uninstall : uninstall-librtapscanmob + +uninstall-librtapscanmob : + @cd librtapscanmob && make uninstall + +## Nettoyage ## + +clean : + @cd librtapscanmob && make clean + +purge : + @cd librtapscanmob && make purge + +## Aide ## + +help : + @echo "Bibliothèques nécessaires à la compilation :\n\ + libpcap0.8-dev\n\ + librtaputil1.0 (fournie)\n\ + \n\ + Cibles possibles :\n\ + all (cible par défaut) : Compile tous les modules.\n\ + : Compile uniquement le module (et ses dépendances).\n\ + \n\ + install : Installe tous les modules.\n\ + install- : Installe uniquement le module (et ses dépendances).\n\ + \n\ + uninstall : Désinstalle tous les modules.\n\ + uninstall- : Désinstalle uniquement le module (et ses dépendances).\n\ + \n\ + clean : Supprime les fichiers temporaires.\n\ + purge : Supprime le résultat de la compilation.\n\ + \n\ + Note : l'installation se fait dans l'arborescence /usr/local. Modifiez la variable PREFIX de chaque Makefile pour changer ce comportement." diff --git a/loc-mobile/code/librtapanalyser/Makefile b/loc-mobile/librtapscanmob/Makefile similarity index 98% rename from loc-mobile/code/librtapanalyser/Makefile rename to loc-mobile/librtapscanmob/Makefile index 1980ea0..7a12537 100644 --- a/loc-mobile/code/librtapanalyser/Makefile +++ b/loc-mobile/librtapscanmob/Makefile @@ -35,7 +35,7 @@ CFLAGS=-O2 -W -Wall -Wstrict-prototypes -I. DEPFLAGS=-MMD XCFLAGS=$(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS) PICFLAG=-fPIC -LIBS=-lm -lpcap ../../../loc-bts/code/librtaputil/librtaputil.so.1.0 +LIBS=-lm -lpcap ../../librtaputil/librtaputil.so.1.0 #STRIPFLAGS= -Wl,-s diff --git a/loc-mobile/code/librtapanalyser/librtapanalyser.c b/loc-mobile/librtapscanmob/librtapscanmob.c similarity index 100% rename from loc-mobile/code/librtapanalyser/librtapanalyser.c rename to loc-mobile/librtapscanmob/librtapscanmob.c diff --git a/loc-mobile/code/librtapanalyser/rtapanalyser.h b/loc-mobile/librtapscanmob/rtapscanmob.h similarity index 97% rename from loc-mobile/code/librtapanalyser/rtapanalyser.h rename to loc-mobile/librtapscanmob/rtapscanmob.h index 2328385..7dbd8cf 100644 --- a/loc-mobile/code/librtapanalyser/rtapanalyser.h +++ b/loc-mobile/librtapscanmob/rtapscanmob.h @@ -9,7 +9,7 @@ #include -#include "../../../loc-bts/code/librtaputil/rtaputil.h" +#include "../../librtaputil/rtaputil.h" diff --git a/loc-mobile/code/librtapanalyser/tx.c b/loc-mobile/librtapscanmob/tx.c similarity index 100% rename from loc-mobile/code/librtapanalyser/tx.c rename to loc-mobile/librtapscanmob/tx.c