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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
diff --git a/Release/makefile b/Release/makefile
index f30e46e..2cd455f 100644
--- a/Release/makefile
+++ b/Release/makefile
@@ -5,6 +5,7 @@
-include ../makefile.init
RM := rm -rf
+DESTDIR := '/usr/local'
# All of the sources participating in the build are defined here
-include sources.mk
@@ -30,19 +31,62 @@ endif
# Add inputs and outputs from these tool invocations to the build variables
# All Target
-all: OpenV2G.exe
+all: OpenV2G
# Tool invocations
-OpenV2G.exe: $(OBJS) $(USER_OBJS)
+OpenV2G: $(BIN_OBJS) $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: MinGW C Linker'
- gcc -o "OpenV2G.exe" $(OBJS) $(USER_OBJS) $(LIBS)
+ @echo 'objs: $(OBJS) userobjs: $(USER_OBJS) libs: $(LIBS)'
+ ar rcs 'libopenv2g.a' $(OBJS) $(USER_OBJS)
+ gcc -shared -o 'libopenv2g.so' $(OBJS) $(USER_OBJS) $(LIBS)
+ gcc -o 'openv2g' $(BIN_OBJS) $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
+install: all
+ @install -D -m 755 -t '$(DESTDIR)/bin' 'openv2g'
+ @install -D -m 644 'libopenv2g.so' '$(DESTDIR)/lib/libopenv2g.so.0.9.4'
+ @ln -s 'libopenv2g.so.0.9.4' '$(DESTDIR)/lib/libopenv2g.so.0'
+ @ln -s 'libopenv2g.so.0' '$(DESTDIR)/lib/libopenv2g.so'
+ @install -D -m 644 -t '$(DESTDIR)/lib' 'libopenv2g.a'
+ @install -D -m 644 -t '$(DESTDIR)/include/openv2g/appHandshake' \
+ ../src/appHandshake/appHandEXIDatatypes.h \
+ ../src/appHandshake/appHandEXIDatatypesDecoder.h \
+ ../src/appHandshake/appHandEXIDatatypesEncoder.h
+ @install -D -m 644 -t '$(DESTDIR)/include/openv2g/codec' \
+ ../src/codec/BitInputStream.h \
+ ../src/codec/BitOutputStream.h \
+ ../src/codec/ByteStream.h \
+ ../src/codec/DecoderChannel.h \
+ ../src/codec/EXIConfig.h \
+ ../src/codec/EXIHeaderDecoder.h \
+ ../src/codec/EXIHeaderEncoder.h \
+ ../src/codec/EXIOptions.h \
+ ../src/codec/EXITypes.h \
+ ../src/codec/EncoderChannel.h \
+ ../src/codec/ErrorCodes.h \
+ ../src/codec/MethodsBag.h
+ @install -D -m 644 -t '$(DESTDIR)/include/openv2g/din' \
+ ../src/din/dinEXIDatatypes.h \
+ ../src/din/dinEXIDatatypesDecoder.h \
+ ../src/din/dinEXIDatatypesEncoder.h \
+ ../src/iso1/iso1EXIDatatypes.h \
+ ../src/iso1/iso1EXIDatatypesDecoder.h \
+ ../src/iso1/iso1EXIDatatypesEncoder.h \
+ ../src/iso2/iso2EXIDatatypes.h \
+ ../src/iso2/iso2EXIDatatypesDecoder.h \
+ ../src/iso2/iso2EXIDatatypesEncoder.h
+ @install -D -m 644 -t '$(DESTDIR)/include/openv2g/transport' \
+ ../src/transport/v2gtp.h
+ @install -D -m 644 -t '$(DESTDIR)/include/openv2g/xmldsig' \
+ ../src/xmldsig/xmldsigEXIDatatypes.h \
+ ../src/xmldsig/xmldsigEXIDatatypesDecoder.h \
+ ../src/xmldsig/xmldsigEXIDatatypesEncoder.h
+
# Other Targets
clean:
- -$(RM) $(EXECUTABLES)$(OBJS)$(C_DEPS) OpenV2G.exe
+ -$(RM) $(EXECUTABLES)$(OBJS)$(C_DEPS) openv2g libopenv2g.a libopenv2g.so
-@echo ' '
.PHONY: all clean dependents
diff --git a/Release/src/appHandshake/subdir.mk b/Release/src/appHandshake/subdir.mk
index 9181dcc..cd8e5a3 100644
--- a/Release/src/appHandshake/subdir.mk
+++ b/Release/src/appHandshake/subdir.mk
@@ -23,7 +23,7 @@ C_DEPS += \
src/appHandshake/%.o: ../src/appHandshake/%.c
@echo 'Building file: $<'
@echo 'Invoking: GCC C Compiler'
- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/Release/src/codec/subdir.mk b/Release/src/codec/subdir.mk
index ecedb18..d1647bf 100644
--- a/Release/src/codec/subdir.mk
+++ b/Release/src/codec/subdir.mk
@@ -38,7 +38,7 @@ C_DEPS += \
src/codec/%.o: ../src/codec/%.c
@echo 'Building file: $<'
@echo 'Invoking: GCC C Compiler'
- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/Release/src/din/subdir.mk b/Release/src/din/subdir.mk
index 209e552..773d4ce 100644
--- a/Release/src/din/subdir.mk
+++ b/Release/src/din/subdir.mk
@@ -23,7 +23,7 @@ C_DEPS += \
src/din/%.o: ../src/din/%.c
@echo 'Building file: $<'
@echo 'Invoking: GCC C Compiler'
- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/Release/src/iso1/subdir.mk b/Release/src/iso1/subdir.mk
index d8ea6ae..7920ac8 100644
--- a/Release/src/iso1/subdir.mk
+++ b/Release/src/iso1/subdir.mk
@@ -23,7 +23,7 @@ C_DEPS += \
src/iso1/%.o: ../src/iso1/%.c
@echo 'Building file: $<'
@echo 'Invoking: GCC C Compiler'
- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/Release/src/iso2/subdir.mk b/Release/src/iso2/subdir.mk
index caf3b79..de3ba35 100644
--- a/Release/src/iso2/subdir.mk
+++ b/Release/src/iso2/subdir.mk
@@ -23,7 +23,7 @@ C_DEPS += \
src/iso2/%.o: ../src/iso2/%.c
@echo 'Building file: $<'
@echo 'Invoking: GCC C Compiler'
- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/Release/src/test/subdir.mk b/Release/src/test/subdir.mk
index eceb3be..9f5db63 100644
--- a/Release/src/test/subdir.mk
+++ b/Release/src/test/subdir.mk
@@ -8,7 +8,7 @@ C_SRCS += \
../src/test/main_databinder.c \
../src/test/main_example.c
-OBJS += \
+BIN_OBJS += \
./src/test/main.o \
./src/test/main_databinder.o \
./src/test/main_example.o
@@ -23,7 +23,7 @@ C_DEPS += \
src/test/%.o: ../src/test/%.c
@echo 'Building file: $<'
@echo 'Invoking: GCC C Compiler'
- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/Release/src/transport/subdir.mk b/Release/src/transport/subdir.mk
index fc10ca1..c4e8b99 100644
--- a/Release/src/transport/subdir.mk
+++ b/Release/src/transport/subdir.mk
@@ -17,7 +17,7 @@ C_DEPS += \
src/transport/%.o: ../src/transport/%.c
@echo 'Building file: $<'
@echo 'Invoking: GCC C Compiler'
- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
diff --git a/Release/src/xmldsig/subdir.mk b/Release/src/xmldsig/subdir.mk
index 2497b78..20e799f 100644
--- a/Release/src/xmldsig/subdir.mk
+++ b/Release/src/xmldsig/subdir.mk
@@ -23,7 +23,7 @@ C_DEPS += \
src/xmldsig/%.o: ../src/xmldsig/%.c
@echo 'Building file: $<'
@echo 'Invoking: GCC C Compiler'
- gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+ gcc -I"../src/codec" -I"../src/din" -I"../src/iso1" -I"../src/iso2" -I"../src/xmldsig" -I"../src/appHandshake" -I"../src/transport" -I"../src/test" -fPIC -Os -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' '
|