This closes #3
diff --git a/.gitignore b/.gitignore
index 9d067b7..c33b16b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
 **/*.iml
 **/nb-configuration.xml
 **/target
-**/bin
+**/lib/linux-*
 **/obj
 .idea/
 ratReport.txt
diff --git a/README.md b/README.md
index 60607da..26ddba1 100644
--- a/README.md
+++ b/README.md
@@ -93,7 +93,7 @@
 
 From the project base directory, run:
 
-```docker build -f src/main/docker/Dockerfile-centos -t artemis-native-builder . && docker run -v $PWD/target/bin:/work/target/bin artemis-native-builder && sudo chown -Rv $USER:$GID target/bin```
+```docker build -f src/main/docker/Dockerfile-centos -t artemis-native-builder . && docker run -v $PWD/target/lib:/work/target/lib artemis-native-builder && sudo chown -Rv $USER:$GID target/lib```
 
 
 ## Steps to build (manual)
diff --git a/pom.xml b/pom.xml
index 7c7ea3a..02ff3e3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,7 +52,7 @@
         <maven.compiler.target>1.8</maven.compiler.target>
 
         <activemq-surefire-argline>
-            -Djava.library.path="${activemq.basedir}/target/bin"
+            -Djava.library.path="${activemq.basedir}/target/lib/linux-${os.arch}"
         </activemq-surefire-argline>
         <activemq.basedir>${project.basedir}</activemq.basedir>
         <skipLicenseCheck>true</skipLicenseCheck>
@@ -368,7 +368,7 @@
                 <artifactId>maven-resources-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>copy-resources-32</id>
+                        <id>copy-resources-i686</id>
                         <phase>compile</phase>
                         <goals>
                             <goal>copy-resources</goal>
@@ -377,7 +377,7 @@
                             <outputDirectory>${basedir}/target/output/lib/linux-i686/</outputDirectory>
                             <resources>
                                 <resource>
-                                    <directory>target/bin/</directory>
+                                    <directory>target/lib/linux-i686</directory>
                                     <includes>
                                         <include>libartemis-native-32.so</include>
                                     </includes>
@@ -386,7 +386,7 @@
                         </configuration>
                     </execution>
                     <execution>
-                        <id>copy-resources-64</id>
+                        <id>copy-resources-x86_64</id>
                         <phase>compile</phase>
                         <goals>
                             <goal>copy-resources</goal>
@@ -395,7 +395,61 @@
                             <outputDirectory>${basedir}/target/output/lib/linux-x86_64/</outputDirectory>
                             <resources>
                                 <resource>
-                                    <directory>target/bin/</directory>
+                                    <directory>target/lib/linux-amd64</directory>
+                                    <includes>
+                                        <include>libartemis-native-64.so</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>copy-resources-aarch64</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/output/lib/linux-aarch64/</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>target/lib/linux-aarch64</directory>
+                                    <includes>
+                                        <include>libartemis-native-64.so</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>copy-resources-ppc64le</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/output/lib/linux-ppc64le/</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>target/lib/linux-ppc64le</directory>
+                                    <includes>
+                                        <include>libartemis-native-64.so</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>copy-resources-s390x</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/output/lib/linux-s390x/</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>target/lib/linux-s390x</directory>
                                     <includes>
                                         <include>libartemis-native-64.so</include>
                                     </includes>
@@ -471,4 +525,4 @@
         </plugins>
     </reporting>
 
-</project>
\ No newline at end of file
+</project>
diff --git a/scripts/32test.sh b/scripts/32test.sh
index 2e3dd57..255b394 100755
--- a/scripts/32test.sh
+++ b/scripts/32test.sh
@@ -20,7 +20,7 @@
 
 docker build -f src/main/docker/Dockerfile-ubuntu-32 -t artemis-native-builder-32 .
 # This is mapping your maven repository inside the image to avoid you downloading the internet again
-docker run -it --rm -v $PWD/target/bin:/work/target/bin -v $HOME/.m2/repository/:/root/.m2/repository artemis-native-builder-32 ./mvnw test
+docker run -it --rm -v $PWD/target/lib:/work/target/lib -v $HOME/.m2/repository/:/root/.m2/repository artemis-native-builder-32 ./mvnw test
 
 # you could use it this way
-#docker run -it --rm -v $PWD/target/bin:/work/target/bin -v $HOME/.m2/repository/:/root/.m2/repository artemis-native-builder-64 bash
+#docker run -it --rm -v $PWD/target/lib:/work/target/lib -v $HOME/.m2/repository/:/root/.m2/repository artemis-native-builder-64 bash
diff --git a/scripts/64test.sh b/scripts/64test.sh
index b21dd1b..7fb3af6 100755
--- a/scripts/64test.sh
+++ b/scripts/64test.sh
@@ -21,7 +21,7 @@
 docker build -f src/main/docker/Dockerfile-centos -t artemis-native-builder .
 
 # This is mapping your maven repository inside the image to avoid you downloading the internet again
-docker run -it --rm -v $PWD/target/bin:/work/target/bin -v $HOME/.m2/repository/:/root/.m2/repository artemis-native-builder ./mvnw test
+docker run -it --rm -v $PWD/target/lib:/work/target/lib -v $HOME/.m2/repository/:/root/.m2/repository artemis-native-builder ./mvnw test
 
 # you could use it this way
-#docker build -f src/main/docker/Dockerfile-centos -t artemis-native-builder . && docker run -it --rm -v $PWD/target/bin:/work/target/bin -v $HOME/.m2/repository/:/root/.m2/repository artemis-native-builder bash
+#docker build -f src/main/docker/Dockerfile-centos -t artemis-native-builder . && docker run -it --rm -v $PWD/target/lib:/work/target/lib -v $HOME/.m2/repository/:/root/.m2/repository artemis-native-builder bash
diff --git a/scripts/compile-using-docker.sh b/scripts/compile-using-docker.sh
index a008b69..8923ab5 100755
--- a/scripts/compile-using-docker.sh
+++ b/scripts/compile-using-docker.sh
@@ -18,12 +18,12 @@
 
 if [ -d "./bin" ]; then rm -Rf ./bin; fi
 docker build -f src/main/docker/Dockerfile-centos -t artemis-native-builder .
-docker run --rm -v $PWD/target/bin:/work/target/bin artemis-native-builder "$@"
+docker run --rm -v $PWD/target/lib:/work/target/lib artemis-native-builder "$@"
 chown -Rv $USER:$GID ./bin
-ls -liat ./target/bin
+ls -liat ./target/lib
 
 # Note: You may need to authorize docker to map folder at your folder structure
-#docker build -f src/main/docker/Dockerfile-centos -t artemis-native-builder . && docker run -it --rm -v $PWD/target/bin:/work/target/bin artemis-native-builder bash
+#docker build -f src/main/docker/Dockerfile-centos -t artemis-native-builder . && docker run -it --rm -v $PWD/target/lib:/work/target/lib artemis-native-builder bash
 
 
 ## 64 bits build
@@ -31,16 +31,16 @@
 #docker build -f ./src/main/docker/Dockerfile-ubuntu -t artemis-native-builder .
 
 # Note: You may need to authorize docker to map folder at your folder structure
-#docker run -it --rm -v $PWD/target/bin:/work/target/bin artemis-native-builder bash ./compile-native.sh
+#docker run -it --rm -v $PWD/target/lib:/work/target/lib artemis-native-builder bash ./compile-native.sh
 
 ## if you need to debug compilation
-#docker run -it --rm -v $PWD/target/bin:/work/target/bin artemis-native-builder bash
+#docker run -it --rm -v $PWD/target/lib:/work/target/lib artemis-native-builder bash
 
 #docker image rm artemis-native-builder-32 -f
 #docker build -f ./src/main/docker/Dockerfile-ubuntu-32 -t artemis-native-builder-32 .
 
 # Note: You may need to authorize docker to map folder at your folder structure
-#docker run -it --rm -v $PWD/target/bin:/work/target/bin artemis-native-builder-32 bash ./compile-native.sh
+#docker run -it --rm -v $PWD/target/lib:/work/target/lib artemis-native-builder-32 bash ./compile-native.sh
 
 ## if you need to debug compilation
-#docker run -it --rm -v $PWD/target/bin:/work/target/bin artemis-native-builder-32 bash
+#docker run -it --rm -v $PWD/target/lib:/work/target/lib artemis-native-builder-32 bash
diff --git a/src/main/c/CMakeLists.txt b/src/main/c/CMakeLists.txt
index 2662bca..67275cf 100644
--- a/src/main/c/CMakeLists.txt
+++ b/src/main/c/CMakeLists.txt
@@ -40,6 +40,11 @@
 if (CMAKE_SIZEOF_VOID_P EQUAL 4)
     set(ARTEMIS_LIB_NAME artemis-native-32)
 endif()
+if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
+    set(ARTEMIS_LIB_DIR lib/linux-amd64)
+else()
+    set(ARTEMIS_LIB_DIR lib/linux-${CMAKE_SYSTEM_PROCESSOR})
+endif()
 
 set(ARTEMIS_CROSS_COMPILE OFF CACHE BOOL "Cross-compile the native library")
 
@@ -51,6 +56,9 @@
     message(STATUS "Using cross-compilation")
     set(ARTEMIS_CROSS_COMPILE_ROOT_PATH /usr/lib)
     set(ARTEMIS_LIB_NAME artemis-native-32)
+    if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
+        set(ARTEMIS_LIB_DIR lib/linux-i686)
+    endif()
 
     # The Cmake variable CMAKE_FIND_ROOT_PATH cannot be set via CLI, so we have to use a separate variable and then
     # set it to that value. We use ARTEMIS_CROSS_COMPILE_ROOT_PATH for that.
@@ -73,6 +81,6 @@
 target_link_libraries(artemis-native ${LIBAIO_LIB})
 
 set_target_properties(artemis-native PROPERTIES
-              LIBRARY_OUTPUT_DIRECTORY ../../../target/bin
+              LIBRARY_OUTPUT_DIRECTORY ../../../target/${ARTEMIS_LIB_DIR}
               LIBRARY_OUTPUT_NAME ${ARTEMIS_LIB_NAME})
 message(STATUS "Setting up library as ${ARTEMIS_LIB_NAME} based on current architecture")
diff --git a/src/main/docker/Dockerfile-centos b/src/main/docker/Dockerfile-centos
index c4e9f6b..befd742 100644
--- a/src/main/docker/Dockerfile-centos
+++ b/src/main/docker/Dockerfile-centos
@@ -31,7 +31,7 @@
 
 WORKDIR /work
 
-VOLUME ["/work/target/bin"]
+VOLUME ["/work/target/lib"]
 VOLUME ["/root/.m2/repository"]
 
 WORKDIR /work
diff --git a/src/main/docker/Dockerfile-ubuntu b/src/main/docker/Dockerfile-ubuntu
index e9bf5f9..b27fe36 100644
--- a/src/main/docker/Dockerfile-ubuntu
+++ b/src/main/docker/Dockerfile-ubuntu
@@ -40,7 +40,7 @@
 ADD . /work
 
 # Expose some outstanding folders
-VOLUME ["/work/target/bin"]
+VOLUME ["/work/target/lib"]
 WORKDIR /work
 
 CMD ["RUN"]
diff --git a/src/main/docker/Dockerfile-ubuntu-32 b/src/main/docker/Dockerfile-ubuntu-32
index 27b62a1..b9f5cfe 100644
--- a/src/main/docker/Dockerfile-ubuntu-32
+++ b/src/main/docker/Dockerfile-ubuntu-32
@@ -34,7 +34,7 @@
 ADD . /work
 
 # Expose some outstanding folders
-VOLUME ["/work/target/bin"]
+VOLUME ["/work/target/lib"]
 #VOLUME ["/root/.m2/repository"]
 WORKDIR /work