From dfe60f3de5ffb20b4edeb1d5a9ae695c1f74e5b8 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Fri, 22 Feb 2008 15:12:42 +0000 Subject: [PATCH] =?UTF-8?q?R=C3=A9organisation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@17 785a6c6c-259e-4ff1-8b91-dc31627914f0 Réorganisation, phase 1 git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@18 785a6c6c-259e-4ff1-8b91-dc31627914f0 Réorganisation, phase 2 git-svn-id: https://pif.pu-pm.univ-fcomte.fr/svn/loc@19 785a6c6c-259e-4ff1-8b91-dc31627914f0 Réorganisation, suite et fin Correction du code en fonction de la réorganisation (références à librtaputil). Création de Makefiles de plus haut niveau. --- Makefile | 73 +++++++++++++++++++ .../code/librtaputil => librtaputil}/Makefile | 0 .../librtaputil => librtaputil}/librtaputil.c | 0 .../librtaputil => librtaputil}/rtaputil.h | 0 loc-bts/{code => }/Makefile | 45 ++++++------ loc-bts/{code => }/ap/Makefile | 2 +- loc-bts/{code => }/ap/ap.h | 2 +- loc-bts/{code => }/ap/apd.c | 0 loc-bts/{code => }/client/Makefile | 2 +- loc-bts/{code => }/client/locclient.c | 2 +- loc-bts/{code => }/rtapaggregate/Makefile | 2 +- .../{code => }/rtapaggregate/rtapaggregate.h | 2 +- .../{code => }/rtapaggregate/rtapaggregated.c | 0 loc-mobile/Makefile | 52 +++++++++++++ .../Makefile | 2 +- .../librtapscanmob.c} | 0 .../rtapscanmob.h} | 2 +- .../librtapanalyser => librtapscanmob}/tx.c | 0 18 files changed, 155 insertions(+), 31 deletions(-) create mode 100644 Makefile rename {loc-bts/code/librtaputil => librtaputil}/Makefile (100%) rename {loc-bts/code/librtaputil => librtaputil}/librtaputil.c (100%) rename {loc-bts/code/librtaputil => librtaputil}/rtaputil.h (100%) rename loc-bts/{code => }/Makefile (58%) rename loc-bts/{code => }/ap/Makefile (96%) rename loc-bts/{code => }/ap/ap.h (95%) rename loc-bts/{code => }/ap/apd.c (100%) rename loc-bts/{code => }/client/Makefile (97%) rename loc-bts/{code => }/client/locclient.c (99%) rename loc-bts/{code => }/rtapaggregate/Makefile (96%) rename loc-bts/{code => }/rtapaggregate/rtapaggregate.h (98%) rename loc-bts/{code => }/rtapaggregate/rtapaggregated.c (100%) create mode 100644 loc-mobile/Makefile rename loc-mobile/{code/librtapanalyser => librtapscanmob}/Makefile (98%) rename loc-mobile/{code/librtapanalyser/librtapanalyser.c => librtapscanmob/librtapscanmob.c} (100%) rename loc-mobile/{code/librtapanalyser/rtapanalyser.h => librtapscanmob/rtapscanmob.h} (97%) rename loc-mobile/{code/librtapanalyser => librtapscanmob}/tx.c (100%) 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