summaryrefslogtreecommitdiff
path: root/packages/nrlolsr/nrlolsr-7.8.1/nrlolsr-cross.patch
blob: 92af69f4f3931f8b91ded259f24e71cba27f24b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
diff -Nurd nrlolsr/protolib/unix/Makefile.common nrlolsr.new/protolib/unix/Makefile.common
--- nrlolsr/protolib/unix/Makefile.common	2006-12-15 12:30:58.000000000 -0500
+++ nrlolsr.new/protolib/unix/Makefile.common	2009-02-13 10:43:26.000000000 -0500
@@ -12,9 +12,9 @@
 
 INCLUDES = $(TCL_INCL_PATH) $(SYSTEM_INCLUDES) -I$(UNIX) -I$(COMMON)
 
-CFLAGS = -g -DPROTO_DEBUG -DUNIX -D_FILE_OFFSET_BITS=64 -O -Wall -Wcast-align -pedantic -fPIC $(SYSTEM_HAVES) $(INCLUDES)
+NRL_CFLAGS = -g -DPROTO_DEBUG -DUNIX -D_FILE_OFFSET_BITS=64 -O -Wall -Wcast-align -pedantic -fPIC $(SYSTEM_HAVES) $(INCLUDES)
 
-LDFLAGS = $(SYSTEM_LDFLAGS)
+NRL_LDFLAGS = $(SYSTEM_LDFLAGS)
 
 LIBS = $(SYSTEM_LIBS) -lm -lpthread
 
@@ -22,7 +22,7 @@
 
 # Rule for C++ .cpp extension
 .cpp.o:
-	$(CC) -c $(CFLAGS) -o $*.o $*.cpp
+	$(CC) -c $(CFLAGS) $(NRL_CFLAGS) -o $*.o $*.cpp
 
 KIT_SRC = $(COMMON)/protoDebug.cpp  $(COMMON)/protoAddress.cpp \
           $(COMMON)/protoSocket.cpp $(COMMON)/protoTimer.cpp \
@@ -50,37 +50,37 @@
 EXAMPLE_OBJ = $(EXAMPLE_SRC:.cpp=.o)
 
 protoExample:    $(EXAMPLE_OBJ) libProtokit.a
-	$(CC) $(CFLAGS) -o $@ $(EXAMPLE_OBJ) $(LDFLAGS) $(LIBS) libProtokit.a
+	$(CC) $(CFLAGS) $(NRLCFLAGS) -o $@ $(EXAMPLE_OBJ) $(LDFLAGS) $(NRL_LDFLAGS) $(LIBS) libProtokit.a
     
 THREAD_SRC = $(COMMON)/threadExample.cpp
 THREAD_OBJ = $(THREAD_SRC:.cpp=.o)
 
 threadExample:    $(THREAD_OBJ) libProtokit.a
-	$(CC) $(CFLAGS) -o $@ $(THREAD_OBJ) $(LDFLAGS) $(LIBS) libProtokit.a
+	$(CC) $(CFLAGS) $(BRL_CFLAGS) -o $@ $(THREAD_OBJ) $(LDFLAGS) $(LIBS) libProtokit.a
     
 PIPE_SRC = $(COMMON)/pipeExample.cpp
 PIPE_OBJ = $(PIPE_SRC:.cpp=.o)
 
 pipeExample:    $(PIPE_OBJ) libProtokit.a
-	$(CC) $(CFLAGS) -o $@ $(PIPE_OBJ) $(LDFLAGS) $(LIBS) libProtokit.a
+	$(CC) $(CFLAGS) $(NRLCFLAGS) -o $@ $(PIPE_OBJ) $(LDFLAGS) $(NRL_LDFLAGS) $(LIBS) libProtokit.a
 
 PCAP_SRC = $(COMMON)/pcapExample.cpp $(COMMON)/protoPacketeer.cpp linuxPacketeer.cpp
 PCAP_OBJ = $(PCAP_SRC:.cpp=.o)
 
 pcapExample:    $(PCAP_OBJ) libProtokit.a
-	$(CC) $(CFLAGS) -o $@ $(PCAP_OBJ) $(LDFLAGS) $(LIBS) libProtokit.a -lpcap
+	$(CC) $(CFLAGS) $(NRL_CFLAGS) -o $@ $(PCAP_OBJ) $(LDFLAGS) $(NRL_LDFLAGS) $(LIBS) libProtokit.a -lpcap
         
 CAP_SRC = $(COMMON)/protoCapExample.cpp
 CAP_OBJ = $(CAP_SRC:.cpp=.o)
 
 protoCapExample:    $(CAP_OBJ) libProtokit.a
-	$(CC) $(CFLAGS) -o $@ $(CAP_OBJ) $(LDFLAGS) $(LIBS) libProtokit.a
+	$(CC) $(CFLAGS) $(NRL_CFLAGS) -o $@ $(CAP_OBJ) $(LDFLAGS) $(NRL_LDFLAGS) $(LIBS) libProtokit.a
     
 DETOUR_SRC = $(COMMON)/detourExample.cpp $(SYSTEM_SRC_EX)
 DETOUR_OBJ = $(DETOUR_SRC:.cpp=.o)
 
 detourExample:    $(DETOUR_OBJ) libProtokit.a
-	$(CC) $(CFLAGS) -o $@ $(DETOUR_OBJ) $(LDFLAGS) $(LIBS) libProtokit.a
+	$(CC) $(CFLAGS) $(NRL_CFLAGS) -o $@ $(DETOUR_OBJ) $(LDFLAGS) $(NRL_LDFLOAGS) $(LIBS) libProtokit.a
         
 clean:	
 	rm -f *.o $(COMMON)/*.o $(NS)/*.o ../wx/*.o *.a \
diff -Nurd nrlolsr/unix/Makefile.common nrlolsr.new/unix/Makefile.common
--- nrlolsr/unix/Makefile.common	2005-11-03 12:09:57.000000000 -0500
+++ nrlolsr.new/unix/Makefile.common	2009-02-13 11:12:23.000000000 -0500
@@ -13,11 +13,11 @@
 
 INCLUDES = $(TCL_INCL_PATH) $(SYSTEM_INCLUDES) $(WX_INCLUDES) -I$(UNIX) -I$(COMMON) -I$(PROTOLIB)/common
 
-CFLAGS = -g -DPROTO_DEBUG -DUNIX -Wall -O -fPIC $(SYSTEM_HAVES) $(INCLUDES)
+NRL_CFLAGS = -g -DPROTO_DEBUG -DUNIX -Wall -O -fPIC $(SYSTEM_HAVES) $(INCLUDES)
 
 WXCFLAGS = -g -DPROTO_DEBUG -DUNIX -Wall -O -fPIC $(WX_FLAGS) $(SYSTEM_HAVES) $(INCLUDES)
 
-LDFLAGS = $(SYSTEM_LDFLAGS)
+NRL_LDFLAGS = $(SYSTEM_LDFLAGS)
 
 LIBS = $(SYSTEM_LIBS) -lm
 
@@ -25,7 +25,7 @@
 
 # Rule for C++ .cpp extension
 .cpp.o:
-	$(CC) -c $(CFLAGS) -o $*.o $*.cpp
+	$(CC) -c $(CFLAGS) $(NRL_CFLAGS) -o $*.o $*.cpp
 
 all: nrlolsrd
 
@@ -40,13 +40,13 @@
 OLSR_OBJ = $(OLSR_SRC:.cpp=.o)
 
 nrlolsrd:    $(LIBPROTO) $(OLSR_OBJ)
-	$(CC) -g $(CFLAGS) -o $@ $(OLSR_OBJ) $(LDFLAGS) $(LIBS) $(LIBPROTO) -l pcap
+	$(CXX) -g $(CFLAGS) -o $@ $(OLSR_OBJ) $(LDFLAGS) $(NRL_LDFLAGS) $(LIBS) $(LIBPROTO) -l pcap
 
 MNM_SRC = $(COMMON)/mnmMacMsg.cpp $(COMMON)/mnmExample.cpp
 MNM_OBJ = $(MNM_SRC:.cpp=.o)
 
 mnmExample:    $(LIBPROTO) $(MNM_OBJ)
-	$(CC) -g $(CFLAGS) -o $@ $(MNM_OBJ) $(LDFLAGS) $(LIBS) $(LIBPROTO)
+	$(CC) -g $(CFLAGS) $(NRL_CFLAGS) -o $@ $(MNM_OBJ) $(LDFLAGS) $(NRL_LDFLAGS) $(LIBS) $(LIBPROTO)
 
 # Re-define rule for C++ .cpp extension
 .cpp.o:
@@ -56,7 +56,7 @@
 NRLOLSRGUI_OBJ = $(NRLOLSRGUI_SRC:.cpp=.o)
 
 olsrgui:	$(NRLOLSRGUI_OBJ) $(LIBPROTO)
-	$(CC) -g $(WXCFLAGS) -o $@ $(NRLOLSRGUI_OBJ) $(LIBPROTO) $(LDFLAGS) $(WX_FLAGS) $(LIBS) $(WX_LIBS)
+	$(CC) -g $(WXCFLAGS) -o $@ $(NRLOLSRGUI_OBJ) $(LIBPROTO) $(LDFLAGS) $(NRL_LDFLAGS) $(WX_FLAGS) $(LIBS) $(WX_LIBS)
 
 clean:	
 	rm -f *.o $(COMMON)/*.o $(NS)/*.o nrlolsrd olsrgui
Binary files nrlolsr/unix/.Makefile.common.swp and nrlolsr.new/unix/.Makefile.common.swp differ