[i-c] Use -I in Makefiles to avoid full path in .c
Use -I to indicate the path to the libraries (libowlps & libowlps-client), instead of indicating the path into the source files.
This commit is contained in:
parent
f832335f12
commit
0b744995f4
|
@ -21,7 +21,8 @@ HEADER=owlps-client.h
|
|||
OBJS=$(LIB_CIBLE).o
|
||||
|
||||
# Flags
|
||||
CFLAGS=-O2 -Wall -Wextra -Wstrict-prototypes -O -I.
|
||||
LIBOWLPS_DIR = ../../libowlps
|
||||
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes -O -I$(LIBOWLPS_DIR)
|
||||
DEPFLAGS=-MMD
|
||||
XCFLAGS=$(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS)
|
||||
PICFLAG=-fPIC
|
||||
|
|
|
@ -21,7 +21,8 @@ HEADER=owlps-client.h
|
|||
OBJS=$(LIB_CIBLE).o
|
||||
|
||||
# Flags
|
||||
CFLAGS=-O2 -Wall -Wextra -Wstrict-prototypes -O -I.
|
||||
LIBOWLPS_DIR = ../../libowlps
|
||||
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes -O -I$(LIBOWLPS_DIR)
|
||||
DEPFLAGS=-MMD
|
||||
XCFLAGS=$(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS)
|
||||
PICFLAG=-fPIC
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#ifndef _LIBOWLPS_CLIENT_
|
||||
#define _LIBOWLPS_CLIENT_
|
||||
|
||||
#include "../../libowlps/owlps.h"
|
||||
#include <owlps.h>
|
||||
|
||||
/* Error codes */
|
||||
#define ERR_CREATING_SOCKET 151 // Error when creating output socket
|
||||
|
|
|
@ -20,12 +20,13 @@ TARGET=owlps-aggregatord
|
|||
HEADER=owlps-aggregator.h
|
||||
|
||||
# Flags
|
||||
CFLAGS=-O2 -Wall -Wextra -Wstrict-prototypes -O -I.
|
||||
LIBOWLPS_DIR = ../../libowlps
|
||||
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes -O -I$(LIBOWLPS_DIR)
|
||||
DEPFLAGS=-MMD
|
||||
XCFLAGS=$(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS)
|
||||
PICFLAG=-fPIC
|
||||
OWLPSFLAGS = -D USE_TIMESTAMP
|
||||
LIBS = -pthread -lconfuse -L../../libowlps -lowlps
|
||||
LIBS = -pthread -lconfuse -L$(LIBOWLPS_DIR) -lowlps
|
||||
LDFLAGS = $(LIBS) $(OWLPSFLAGS)
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
#ifndef _OWLPS_AGGREGATOR_H_
|
||||
#define _OWLPS_AGGREGATOR_H_
|
||||
|
||||
#include "../../libowlps/owlps.h"
|
||||
#include <owlps.h>
|
||||
|
||||
#include <confuse.h>
|
||||
|
||||
#define DEBUG
|
||||
|
|
|
@ -20,11 +20,14 @@ TARGET=owlps-client
|
|||
HEADER=
|
||||
|
||||
# Flags
|
||||
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes -O -I.
|
||||
LIBOWLPS_DIR = ../../libowlps
|
||||
LIBOWLPSCLIENT_DIR = ../libowlps-client
|
||||
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes \
|
||||
-I$(LIBOWLPS_DIR) -I$(LIBOWLPSCLIENT_DIR)
|
||||
DEPFLAGS = -MMD
|
||||
XCFLAGS = $(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS)
|
||||
PICFLAG = -fPIC
|
||||
LIBS = -L../../libowlps -lowlps -L../libowlps-client -lowlps-client
|
||||
LIBS = -L$(LIBOWLPS_DIR) -lowlps -L$(LIBOWLPSCLIENT_DIR) -lowlps-client
|
||||
STATIC_LIBS = -liw -lm -lrt
|
||||
|
||||
|
||||
|
|
|
@ -23,13 +23,16 @@ TARGET=owlps-client
|
|||
HEADER=
|
||||
|
||||
# Flags
|
||||
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes -I.
|
||||
LIBOWLPS_DIR = ../../libowlps
|
||||
LIBOWLPSCLIENT_DIR = ../libowlps-client
|
||||
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes \
|
||||
-I$(LIBOWLPS_DIR) -I$(LIBOWLPSCLIENT_DIR)
|
||||
DEPFLAGS = -MMD
|
||||
XCFLAGS = $(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS)
|
||||
PICFLAG = -fPIC
|
||||
LOWLPS = -L../../libowlps -lowlps
|
||||
LOWLPSA = ../../libowlps/libowlps.a
|
||||
LOWLPSCLIENTA = ../libowlps-client/libowlps-client.a
|
||||
LOWLPS = -L$(LIBOWLPS_DIR) -lowlps
|
||||
LOWLPSA = $(LIBOWLPS_DIR)/libowlps.a
|
||||
LOWLPSCLIENTA = $(LIBOWLPSCLIENT_DIR)/libowlps-client.a
|
||||
LIBS = $(LOWLPSCLIENTA) -liw -lm
|
||||
DYNAMIC_LIBS = $(LOWLPS) $(LIBS)
|
||||
SEMISTATIC_LIBS = $(LOWLPSA) $(LIBS)
|
||||
|
|
|
@ -23,13 +23,16 @@ TARGET=owlps-client
|
|||
HEADER=
|
||||
|
||||
# Flags
|
||||
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes -I.
|
||||
LIBOWLPS_DIR = ../../libowlps
|
||||
LIBOWLPSCLIENT_DIR = ../libowlps-client
|
||||
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes \
|
||||
-I$(LIBOWLPS_DIR) -I$(LIBOWLPSCLIENT_DIR)
|
||||
DEPFLAGS = -MMD
|
||||
XCFLAGS = $(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS)
|
||||
PICFLAG = -fPIC
|
||||
LOWLPS = -L../../libowlps -lowlps
|
||||
LOWLPSA = ../../libowlps/libowlps.a
|
||||
LOWLPSCLIENTA = ../libowlps-client/libowlps-client.a
|
||||
LOWLPS = -L$(LIBOWLPS_DIR) -lowlps
|
||||
LOWLPSA = $(LIBOWLPS_DIR)/libowlps.a
|
||||
LOWLPSCLIENTA = $(LIBOWLPSCLIENT_DIR)/libowlps-client.a
|
||||
LIBS = $(LOWLPSCLIENTA) -liw -lm
|
||||
DYNAMIC_LIBS = $(LOWLPS) $(LIBS)
|
||||
SEMISTATIC_LIBS = $(LOWLPSA) $(LIBS)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This file is part of the rtap localisation project.
|
||||
*/
|
||||
|
||||
#include "../libowlps-client/owlps-client.h"
|
||||
#include <owlps-client.h>
|
||||
|
||||
#define DEBUG
|
||||
|
||||
|
|
|
@ -20,12 +20,16 @@ TARGET=owlps-listenerd
|
|||
HEADER=owlps-listener.h
|
||||
|
||||
# Flags
|
||||
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes -I.
|
||||
LIBOWLPS_DIR = ../../libowlps
|
||||
LIBOWLPSCLIENT_DIR = ../libowlps-client
|
||||
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes \
|
||||
-I$(LIBOWLPS_DIR) -I$(LIBOWLPSCLIENT_DIR)
|
||||
DEPFLAGS = -MMD
|
||||
XCFLAGS = $(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS)
|
||||
PICFLAG = -fPIC
|
||||
OWLPSFLAGS = -D USE_CONFIG_FILE -lconfuse -D USE_PTHREAD -pthread
|
||||
LIBS = -L../../libowlps -lowlps -L../libowlps-client -lowlps-client \
|
||||
LIBS = -L$(LIBOWLPS_DIR) -lowlps \
|
||||
-L$(LIBOWLPSCLIENT_DIR) -lowlps-client \
|
||||
-lpcap -liw -lm
|
||||
LDFLAGS = $(LIBS) $(OWLPSFLAGS)
|
||||
|
||||
|
|
|
@ -23,13 +23,16 @@ TARGET=owlps-listenerd
|
|||
HEADER=owlps-listener.h
|
||||
|
||||
# Flags
|
||||
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes -I.
|
||||
LIBOWLPS_DIR = ../../libowlps
|
||||
LIBOWLPSCLIENT_DIR = ../libowlps-client
|
||||
CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes \
|
||||
-I$(LIBOWLPS_DIR) -I$(LIBOWLPSCLIENT_DIR)
|
||||
DEPFLAGS = -MMD
|
||||
XCFLAGS = $(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS)
|
||||
PICFLAG = -fPIC
|
||||
LOWLPS = -L../../libowlps -lowlps
|
||||
LOWLPSA = ../../libowlps/libowlps.a
|
||||
LOWLPSCLIENTA = ../libowlps-client/libowlps-client.a
|
||||
LOWLPS = -L$(LIBOWLPS_DIR) -lowlps
|
||||
LOWLPSA = $(LIBOWLPS_DIR)/libowlps.a
|
||||
LOWLPSCLIENTA = $(LIBOWLPSCLIENT_DIR)/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
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
#define DEBUG
|
||||
|
||||
|
||||
#include "../../libowlps/owlps.h"
|
||||
#include "../libowlps-client/owlps-client.h"
|
||||
#include <owlps.h>
|
||||
#include <owlps-client.h>
|
||||
|
||||
#include <pcap.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue