From 58568e276ab11854b2074e08ca161ad87a6f1744 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Fri, 15 Oct 2010 13:25:19 +0200 Subject: [PATCH] [i-c] Fix Atheros Makefiles Add Makefile_atheros for libowlps-client. Fix Makefile_atheros for listener. --- .../libowlps-client/Makefile_atheros | 71 +++++++++++++++++++ .../owlps-listener/Makefile_atheros | 3 +- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 infrastructure-centred/libowlps-client/Makefile_atheros diff --git a/infrastructure-centred/libowlps-client/Makefile_atheros b/infrastructure-centred/libowlps-client/Makefile_atheros new file mode 100644 index 0000000..d647bba --- /dev/null +++ b/infrastructure-centred/libowlps-client/Makefile_atheros @@ -0,0 +1,71 @@ +# Emplacement de la suite de cross-compilation +TOOLCHAIN = $$HOME/openwrt/atheros/8.09/staging_dir + +# Compilateur +CC = $(TOOLCHAIN)/toolchain-mips_gcc4.1.2/bin/mips-linux-gcc + +# Autres outils +AR = ar +RANLIB = ranlib +RM = rm -fv + +# Variables générales +LIB_CIBLE=libowlps-client +VERSION=1.0 + +# Cibles à construire +STATIC=$(LIB_CIBLE).a +HEADER=owlps-client.h + +# Composition de la bibliothèque +OBJS=$(LIB_CIBLE).o + +# Flags +CFLAGS=-O2 -W -Wall -Wstrict-prototypes -O -I. +DEPFLAGS=-MMD +XCFLAGS=$(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS) +PICFLAG=-fPIC +LIBS=-liw +#STRIPFLAGS= -Wl,-s +#LDFLAGS= +LATHEROS=-L$(TOOLCHAIN)/mips/usr/lib/ +IATHEROS=-I$(TOOLCHAIN)/mips/usr/include/ + + +## Cibles de compilation standard ## + +.PHONY : all static clean purge help + +all : static +static : $(STATIC) + +%.o : %.c $(HEADER) + $(CC) $(XCFLAGS) $(IATHEROS) -c $< + +# Compilation de la bibliothèque statique +$(STATIC) : $(OBJS) + $(RM) $@ + $(AR) cru $@ $^ + $(RANLIB) $@ + + +## Nettoyage ## + +clean : + @$(RM) *~ *.o *.d + +purge : clean + @$(RM) $(STATIC) + + +## Aide ## + +help : + @echo "Bibliothèques nécessaires à la compilation :\n\ + libowlps-dev\n\ + \n\ + Cibles possibles :\n\ + static (cible par défaut) : Compile la bibliothèque statique (.a).\n\ + \n\ + clean : Supprime les fichiers temporaires.\n\ + purge : Supprime le résultat de la compilation.\n\" diff --git a/infrastructure-centred/owlps-listener/Makefile_atheros b/infrastructure-centred/owlps-listener/Makefile_atheros index dd2f0bb..d1c7e28 100644 --- a/infrastructure-centred/owlps-listener/Makefile_atheros +++ b/infrastructure-centred/owlps-listener/Makefile_atheros @@ -27,9 +27,10 @@ CFLAGS = -O2 -W -Wall -Wstrict-prototypes -O -I. DEPFLAGS = -MMD XCFLAGS = $(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS) PICFLAG = -fPIC -LIBS = -lpcap -liw -lm LOWLPS = -L../../libowlps -lowlps LOWLPSA = ../../libowlps/libowlps.a +LOWLPSCLIENTA = ../libowlps-client/libowlps-client.a +LIBS = -lpcap -liw -lm $(LOWLPSCLIENTA) LATHEROS = -L$(TOOLCHAIN_USR)/lib -L$(TOOLCHAIN_USR_2)/lib IATHEROS = -I$(TOOLCHAIN_USR)/include -I$(TOOLCHAIN_USR_2)/include #OWLPSFLAGS = -D USE_CONFIG_FILE -lconfuse -D USE_PTHREAD -pthread