Untitled diff

Created Diff never expires
5 removals
Lines
Total
Removed
Words
Total
Removed
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
280 lines
17 additions
Lines
Total
Added
Words
Total
Added
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
278 lines
# Copyright 2006-2013 by Benjamin J. Land (a.k.a. BenLand100)
# Copyright 2006-2013 by Benjamin J. Land (a.k.a. BenLand100)
#
#
# This file is part of the SMART Minimizing Autoing Resource Thing (SMART)
# This file is part of the SMART Minimizing Autoing Resource Thing (SMART)
#
#
# SMART is free software: you can redistribute it and/or modify
# SMART is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# (at your option) any later version.
#
#
# SMART is distributed in the hope that it will be useful,
# SMART is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with SMART. If not, see <http://www.gnu.org/licenses/>.
# along with SMART. If not, see <http://www.gnu.org/licenses/>.
#these compilers work with crossdev on gentoo
#these compilers work with crossdev on gentoo
WIN_GPP=i686-pc-mingw32-g++
WIN_GPP=g++
WIN64_GPP=x86_64-w64-mingw32-g++
WIN64_GPP=g++
LIN_GPP=i686-pc-linux-gnu-g++
LIN_GPP=i686-pc-linux-gnu-g++
LIN64_GPP=x86_64-pc-linux-gnu-g++
LIN64_GPP=x86_64-pc-linux-gnu-g++
JAVAC=javac
JAVAC=javac
JAR=jar
JAR=jar
DIST=dist
DIST=dist
BUILD=build
BUILD=build
WIN_NAME=libsmartremote32.dll
WIN_NAME=libsmartremote32.dll
WIN64_NAME=libsmartremote64.dll
WIN64_NAME=libsmartremote64.dll
LIN_NAME=libsmartremote32.so
LIN_NAME=libsmartremote32.so
LIN64_NAME=libsmartremote64.so
LIN64_NAME=libsmartremote64.so
JNI_WIN_NAME=libsmartjni32.dll
JNI_WIN_NAME=libsmartjni32.dll
JNI_WIN64_NAME=libsmartjni64.dll
JNI_WIN64_NAME=libsmartjni64.dll
JNI_LIN_NAME=libsmartjni32.so
JNI_LIN_NAME=libsmartjni32.so
JNI_LIN64_NAME=libsmartjni64.so
JNI_LIN64_NAME=libsmartjni64.so
JAVA_NAME=smart.jar
JAVA_NAME=smart.jar
WIN_COMPILE_ARGS=-DWINDOWS -O3 -s -c
WIN_COMPILE_ARGS=-DWINDOWS -O3 -s -m32 -c
WIN64_COMPILE_ARGS=-DWINDOWS -O3 -s -c
WIN64_COMPILE_ARGS=-DWINDOWS -O3 -s -m64 -c
LIN_COMPILE_ARGS=-fPIC -DLINUX -O3 -s -c
LIN_COMPILE_ARGS=-fPIC -DLINUX -O3 -s -c
LIN64_COMPILE_ARGS=-fPIC -DLINUX -O3 -s -c
LIN64_COMPILE_ARGS=-fPIC -DLINUX -O3 -s -c
SRC_DIR=src
SRC_DIR=src
LIN_BUILD_DIR=$(BUILD)/linux32
LIN_BUILD_DIR=$(BUILD)/linux32
LIN64_BUILD_DIR=$(BUILD)/linux64
LIN64_BUILD_DIR=$(BUILD)/linux64
WIN_BUILD_DIR=$(BUILD)/windows32
WIN_BUILD_DIR=$(BUILD)/windows32
WIN64_BUILD_DIR=$(BUILD)/windows64
WIN64_BUILD_DIR=$(BUILD)/windows64
JAVA_BUILD_DIR=$(BUILD)/java
JAVA_BUILD_DIR=$(BUILD)/java
CPPSOURCEFILES= \
CPPSOURCEFILES= \
$(SRC_DIR)/SmartRemote.cpp
$(SRC_DIR)/SmartRemote.cpp
JNI_CPPSOURCEFILES= \
JNI_CPPSOURCEFILES= \
$(SRC_DIR)/SmartJNI.cpp
$(SRC_DIR)/SmartJNI.cpp
CPPHEADERFILES= \
CPPHEADERFILES= \
$(SRC_DIR)/SmartRemote.h \
$(SRC_DIR)/SmartRemote.h \
$(SRC_DIR)/libsmartremote.def
$(SRC_DIR)/libsmartremote.def
JNI_CPPHEADERFILES= \
JNI_CPPHEADERFILES= \
$(SRC_DIR)/jni.h \
$(SRC_DIR)/jni.h \
WINOBJFILES= \
WINOBJFILES= \
$(WIN_BUILD_DIR)/SmartRemote.o
$(WIN_BUILD_DIR)/SmartRemote.o
JNI_WINOBJFILES= \
JNI_WINOBJFILES= \
$(WIN_BUILD_DIR)/SmartJNI.o
$(WIN_BUILD_DIR)/SmartJNI.o
WIN64OBJFILES= \
WIN64OBJFILES= \
$(WIN64_BUILD_DIR)/SmartRemote.o
$(WIN64_BUILD_DIR)/SmartRemote.o
JNI_WIN64OBJFILES= \
JNI_WIN64OBJFILES= \
$(WIN64_BUILD_DIR)/SmartJNI.o
$(WIN64_BUILD_DIR)/SmartJNI.o
LINOBJFILES= \
LINOBJFILES= \
$(LIN_BUILD_DIR)/SmartRemote.o
$(LIN_BUILD_DIR)/SmartRemote.o
JNI_LINOBJFILES= \
JNI_LINOBJFILES= \
$(LIN_BUILD_DIR)/SmartJNI.o
$(LIN_BUILD_DIR)/SmartJNI.o
LIN64OBJFILES= \
LIN64OBJFILES= \
$(LIN64_BUILD_DIR)/SmartRemote.o
$(LIN64_BUILD_DIR)/SmartRemote.o
JNI_LIN64OBJFILES= \
JNI_LIN64OBJFILES= \
$(LIN64_BUILD_DIR)/SmartJNI.o
$(LIN64_BUILD_DIR)/SmartJNI.o
JAVASOURCES= \
JAVASOURCES= \
$(SRC_DIR)/Canvas.java \
$(SRC_DIR)/Canvas.java \
$(SRC_DIR)/Main.java \
$(SRC_DIR)/Main.java \
$(SRC_DIR)/BlockingEventQueue.java \
$(SRC_DIR)/BlockingEventQueue.java \
$(SRC_DIR)/Client.java \
$(SRC_DIR)/Client.java \
$(SRC_DIR)/ClientStub.java \
$(SRC_DIR)/ClientStub.java \
$(SRC_DIR)/EventNazi.java \
$(SRC_DIR)/EventNazi.java \
$(SRC_DIR)/EventRedirect.java \
$(SRC_DIR)/EventRedirect.java \
$(SRC_DIR)/UnblockedEvent.java
$(SRC_DIR)/UnblockedEvent.java
JAVACLASSES= \
JAVACLASSES= \
$(JAVA_BUILD_DIR)/java/awt/Canvas.class \
$(JAVA_BUILD_DIR)/java/awt/Canvas.class \
$(JAVA_BUILD_DIR)/smart/Main.class \
$(JAVA_BUILD_DIR)/smart/Main.class \
$(JAVA_BUILD_DIR)/smart/BlockingEventQueue.class \
$(JAVA_BUILD_DIR)/smart/BlockingEventQueue.class \
$(JAVA_BUILD_DIR)/smart/Client.class \
$(JAVA_BUILD_DIR)/smart/Client.class \
$(JAVA_BUILD_DIR)/smart/ClientStub.class \
$(JAVA_BUILD_DIR)/smart/ClientStub.class \
$(JAVA_BUILD_DIR)/smart/EventNazi.class \
$(JAVA_BUILD_DIR)/smart/EventNazi.class \
$(JAVA_BUILD_DIR)/smart/EventRedirect.class \
$(JAVA_BUILD_DIR)/smart/EventRedirect.class \
$(JAVA_BUILD_DIR)/smart/UnblockedEvent.class
$(JAVA_BUILD_DIR)/smart/UnblockedEvent.class
all:
all:
@echo "Syntax for the SMART makefile:"
@echo "Syntax for the SMART makefile:"
@echo " For Windows distributions: make windows windows64"
@echo " For Windows distributions: make windows windows64"
@echo " For Linux distributions: make linux linux64"
@echo " For Linux distributions: make linux linux64"
@echo " For All distributions: make everything"
@echo " For All distributions: make everything"
@echo " For test apps: make test-python test-linux test-linux64 test-windows test-windows64"
@echo " For test apps: make test-python test-linux test-linux64 test-windows test-windows64"
@echo " For all test apps: make test-all"
@echo " For all test apps: make test-all"
@echo " To clean build files: make clean"
@echo " To clean build files: make clean"
everything: linux linux64 windows windows64
everything: linux linux64 windows windows64
test-all: test-python test-windows test-windows64 test-linux test-linux64
test-all: test-python test-windows test-windows64 test-linux test-linux64
linux: $(JAVACLASSES) $(DIST)/$(LIN_NAME) $(DIST)/$(JNI_LIN_NAME)
linux: $(JAVACLASSES) $(DIST)/$(LIN_NAME) $(DIST)/$(JNI_LIN_NAME)
@echo "Finished Building the Linux 32bit SMART distribution"
@echo "Finished Building the Linux 32bit SMART distribution"
linux64: $(JAVACLASSES) $(DIST)/$(LIN64_NAME) $(DIST)/$(JNI_LIN64_NAME)
linux64: $(JAVACLASSES) $(DIST)/$(LIN64_NAME) $(DIST)/$(JNI_LIN64_NAME)
@echo "Finished Building the Linux 64bit SMART distribution"
@echo "Finished Building the Linux 64bit SMART distribution"
windows: $(JAVACLASSES) $(DIST)/$(WIN_NAME) $(DIST)/$(JNI_WIN_NAME)
windows: $(JAVACLASSES) $(DIST)/$(WIN_NAME) $(DIST)/$(JNI_WIN_NAME)
@echo "Finished Building the Windows 32bit SMART distribution"
@echo "Finished Building the Windows 32bit SMART distribution"
windows64: $(JAVACLASSES) $(DIST)/$(WIN64_NAME) $(DIST)/$(JNI_WIN64_NAME)
windows64: $(JAVACLASSES) $(DIST)/$(WIN64_NAME) $(DIST)/$(JNI_WIN64_NAME)
@echo "Finished Building the Windows 64bit SMART distribution"
@echo "Finished Building the Windows 64bit SMART distribution"
test-linux:
test-linux:
@mkdir -p $(DIST)
@mkdir -p $(DIST)
@$(LIN_GPP) -I $(SRC_DIR) -fPIC -shared -s -o $(DIST)/example-plugin32.so test-apps/example-plugin.cpp
@$(LIN_GPP) -I $(SRC_DIR) -fPIC -shared -s -o $(DIST)/example-plugin32.so test-apps/example-plugin.cpp
@$(LIN_GPP) -ldl -o $(DIST)/test-plugin-load32 test-apps/test-plugin-load.cpp
@$(LIN_GPP) -ldl -o $(DIST)/test-plugin-load32 test-apps/test-plugin-load.cpp
@$(LIN_GPP) -ldl -o $(DIST)/test-spawn32 test-apps/test-spawn.cpp
@$(LIN_GPP) -ldl -o $(DIST)/test-spawn32 test-apps/test-spawn.cpp
@$(LIN_GPP) -ldl -o $(DIST)/test-eios32 test-apps/test-eios.cpp
@$(LIN_GPP) -ldl -o $(DIST)/test-eios32 test-apps/test-eios.cpp
@$(LIN_GPP) -ldl -o $(DIST)/test-exports32 test-apps/test-exports.cpp
@$(LIN_GPP) -ldl -o $(DIST)/test-exports32 test-apps/test-exports.cpp
@echo "Finished building Linux 32bit test files"
@echo "Finished building Linux 32bit test files"
test-linux64:
test-linux64:
@mkdir -p $(DIST)
@mkdir -p $(DIST)
@$(LIN64_GPP) -I $(SRC_DIR) -fPIC -shared -s -o $(DIST)/example-plugin64.so test-apps/example-plugin.cpp
@$(LIN64_GPP) -I $(SRC_DIR) -fPIC -shared -s -o $(DIST)/example-plugin64.so test-apps/example-plugin.cpp
@$(LIN64_GPP) -ldl -o $(DIST)/test-plugin-load64 test-apps/test-plugin-load.cpp
@$(LIN64_GPP) -ldl -o $(DIST)/test-plugin-load64 test-apps/test-plugin-load.cpp
@$(LIN64_GPP) -ldl -o $(DIST)/test-spawn64 test-apps/test-spawn.cpp
@$(LIN64_GPP) -ldl -o $(DIST)/test-spawn64 test-apps/test-spawn.cpp
@$(LIN64_GPP) -ldl -o $(DIST)/test-eios64 test-apps/test-eios.cpp
@$(LIN64_GPP) -ldl -o $(DIST)/test-eios64 test-apps/test-eios.cpp
@$(LIN64_GPP) -ldl -o $(DIST)/test-exports64 test-apps/test-exports.cpp
@$(LIN64_GPP) -ldl -o $(DIST)/test-exports64 test-apps/test-exports.cpp
@echo "Finished building Linux 64bit test files"
@echo "Finished building Linux 64bit test files"
test-windows:
test-windows:
@mkdir -p $(DIST)
@mkdir -p $(DIST)
@$(WIN_GPP) -I $(SRC_DIR) -shared -static-libgcc -static-libstdc++ -s -o $(DIST)/example-plugin32.dll test-apps/example-plugin.cpp
@$(WIN_GPP) -I $(SRC_DIR) -shared -static-libgcc -static-libstdc++ -s -o $(DIST)/example-plugin32.dll test-apps/example-plugin.cpp
@$(WIN_GPP) -static-libgcc -static-libstdc++ -o $(DIST)/test-plugin-load32.exe test-apps/test-plugin-load.cpp
@$(WIN_GPP) -static-libgcc -static-libstdc++ -o $(DIST)/test-plugin-load32.exe test-apps/test-plugin-load.cpp
@$(WIN_GPP) -static-libgcc -static-libstdc++ -o $(DIST)/test-spawn32.exe test-apps/test-spawn.cpp
@$(WIN_GPP) -static-libgcc -static-libstdc++ -o $(DIST)/test-spawn32.exe test-apps/test-spawn.cpp
@$(WIN_GPP) -static-libgcc -static-libstdc++ -o $(DIST)/test-eios32.exe test-apps/test-eios.cpp
@$(WIN_GPP) -static-libgcc -static-libstdc++ -o $(DIST)/test-eios32.exe test-apps/test-eios.cpp
@$(WIN_GPP) -static-libgcc -static-libstdc++ -o $(DIST)/test-exports32.exe test-apps/test-exports.cpp
@$(WIN_GPP) -static-libgcc -static-libstdc++ -o $(DIST)/test-exports32.exe test-apps/test-exports.cpp
@echo "Finished building Windows 32bit test files"
@echo "Finished building Windows 32bit test files"
test-windows64:
test-windows64:
@mkdir -p $(DIST)
@mkdir -p $(DIST)
@$(WIN64_GPP) -I $(SRC_DIR) -shared -static-libgcc -static-libstdc++ -s -o $(DIST)/example-plugin64.dll test-apps/example-plugin.cpp
@$(WIN64_GPP) -I $(SRC_DIR) -shared -static-libgcc -static-libstdc++ -s -o $(DIST)/example-plugin64.dll test-apps/example-plugin.cpp
@$(WIN64_GPP) -static-libgcc -static-libstdc++ -o $(DIST)/test-plugin-load64.exe test-apps/test-plugin-load.cpp
@$(WIN64_GPP) -static -static-libgcc -static-libstdc++ -o $(DIST)/test-plugin-load64.exe test-apps/test-plugin-load.cpp
@$(WIN64_GPP) -static-libgcc -static-libstdc++ -o $(DIST)/test-spawn64.exe test-apps/test-spawn.cpp
@$(WIN64_GPP) -static -static-libgcc -static-libstdc++ -o $(DIST)/test-spawn64.exe test-apps/test-spawn.cpp
@$(WIN64_GPP) -static-libgcc -static-libstdc++ -o $(DIST)/test-eios64.exe test-apps/test-eios.cpp
@$(WIN64_GPP) -static -static-libgcc -static-libstdc++ -o $(DIST)/test-eios64.exe test-apps/test-eios.cpp
@$(WIN64_GPP) -static-libgcc -static-libstdc++ -o $(DIST)/test-exports64.exe test-apps/test-exports.cpp
@$(WIN64_GPP) -static -static-libgcc -static-libstdc++ -o $(DIST)/test-exports64.exe test-apps/test-exports.cpp
@echo "Finished building Windows 64bit test files"
@echo "Finished building Windows 64bit test files"
test-python:
test-python:
@mkdir -p $(DIST)
@mkdir -p $(DIST)
@cp test-apps/test-python.py $(DIST)/test-python
@cp test-apps/test-python.py $(DIST)/test-python
@echo "Finished building Python test files"
@echo "Finished building Python test files"
clean:
clean:
@echo "Cleaning build files..."
@echo "Cleaning build files..."
@rm -rf $(BUILD) $(DIST)
@rm -rf $(BUILD) $(DIST)
#### LINUX BUILDING DIRECTIVES ####
#### LINUX BUILDING DIRECTIVES ####
$(DIST)/$(LIN_NAME): $(LINOBJFILES)
$(DIST)/$(LIN_NAME): $(LINOBJFILES)
@echo "Linking Linux Remote object files..."
@echo "Linking Linux Remote object files..."
@mkdir -p $(DIST)
@mkdir -p $(DIST)
@$(LIN_GPP) -fPIC -shared -s -o $(DIST)/$(LIN_NAME) $(LINOBJFILES)
@$(LIN_GPP) -fPIC -shared -s -o $(DIST)/$(LIN_NAME) $(LINOBJFILES)
$(DIST)/$(JNI_LIN_NAME): $(JNI_LINOBJFILES)
$(DIST)/$(JNI_LIN_NAME): $(JNI_LINOBJFILES)
@echo "Linking Linux JNI object files..."
@echo "Linking Linux JNI object files..."
@mkdir -p $(DIST)
@mkdir -p $(DIST)
@$(LIN_GPP) -fPIC -shared -s -o $(DIST)/$(JNI_LIN_NAME) $(JNI_LINOBJFILES)
@$(LIN_GPP) -fPIC -shared -s -o $(DIST)/$(JNI_LIN_NAME) $(JNI_LINOBJFILES)
$(LIN_BUILD_DIR)/SmartRemote.o: $(SRC_DIR)/SmartRemote.cpp $(CPPHEADERFILES)
$(LIN_BUILD_DIR)/SmartRemote.o: $(SRC_DIR)/SmartRemote.cpp $(CPPHEADERFILES)
@echo "Compiling SmartRemote.cpp"
@echo "Compiling SmartRemote.cpp"
@mkdir -p $(LIN_BUILD_DIR)
@mkdir -p $(LIN_BUILD_DIR)
@$(LIN_GPP) $(LIN_COMPILE_ARGS) -o $(LIN_BUILD_DIR)/SmartRemote.o $(SRC_DIR)/SmartRemote.cpp
@$(LIN_GPP) $(LIN_COMPILE_ARGS) -o $(LIN_BUILD_DIR)/SmartRemote.o $(SRC_DIR)/SmartRemote.cpp
$(LIN_BUILD_DIR)/SmartJNI.o: $(SRC_DIR)/SmartJNI.cpp $(JNI_CPPHEADERFILES)
$(LIN_BUILD_DIR)/SmartJNI.o: $(SRC_DIR)/SmartJNI.cpp $(JNI_CPPHEADERFILES)
@echo "Compiling SmartJNI.cpp"
@echo "Compiling SmartJNI.cpp"
@mkdir -p $(LIN_BUILD_DIR)
@mkdir -p $(LIN_BUILD_DIR)
@$(LIN_GPP) $(LIN_COMPILE_ARGS) -o $(LIN_BUILD_DIR)/SmartJNI.o $(SRC_DIR)/SmartJNI.cpp
@$(LIN_GPP) $(LIN_COMPILE_ARGS) -o $(LIN_BUILD_DIR)/SmartJNI.o $(SRC_DIR)/SmartJNI.cpp
#### LINUX64 BUILDING DIRECTIVES ####
#### LINUX64 BUILDING DIRECTIVES ####
$(DIST)/$(LIN64_NAME): $(LIN64OBJFILES)
$(DIST)/$(LIN64_NAME): $(LIN64OBJFILES)
@echo "Linking Linux64 Remote object files..."
@echo "Linking Linux64 Remote object files..."
@mkdir -p $(DIST)
@mkdir -p $(DIST)
@$(LIN64_GPP) -fPIC -shared -s -o $(DIST)/$(LIN64_NAME) $(LIN64OBJFILES)
@$(LIN64_GPP) -fPIC -shared -s -o $(DIST)/$(LIN64_NAME) $(LIN64OBJFILES)
$(DIST)/$(JNI_LIN64_NAME): $(JNI_LIN64OBJFILES)
$(DIST)/$(JNI_LIN64_NAME): $(JNI_LIN64OBJFILES)
@echo "Linking Linux64 JNI object files..."
@echo "Linking Linux64 JNI object files..."
@mkdir -p $(DIST)
@mkdir -p $(DIST)
@$(LIN64_GPP) -fPIC -shared -s -o $(DIST)/$(JNI_LIN64_NAME) $(JNI_LIN64OBJFILES)
@$(LIN64_GPP) -fPIC -shared -s -o $(DIST)/$(JNI_LIN64_NAME) $(JNI_LIN64OBJFILES)
$(LIN64_BUILD_DIR)/SmartRemote.o: $(SRC_DIR)/SmartRemote.cpp $(CPPHEADERFILES)
$(LIN64_BUILD_DIR)/SmartRemote.o: $(SRC_DIR)/SmartRemote.cpp $(CPPHEADERFILES)
@echo "Compiling SmartRemote.cpp"
@echo "Compiling SmartRemote.cpp"
@mkdir -p $(LIN64_BUILD_DIR)
@mkdir -p $(LIN64_BUILD_DIR)
@$(LIN64_GPP) $(LIN64_COMPILE_ARGS) -o $(LIN64_BUILD_DIR)/SmartRemote.o $(SRC_DIR)/SmartRemote.cpp
@$(LIN64_GPP) $(LIN64_COMPILE_ARGS) -o $(LIN64_BUILD_DIR)/SmartRemote.o $(SRC_DIR)/SmartRemote.cpp
$(LIN64_BUILD_DIR)/SmartJNI.o: $(SRC_DIR)/SmartJNI.cpp $(JNI_CPPHEADERFILES)
$(LIN64_BUILD_DIR)/SmartJNI.o: $(SRC_DIR)/SmartJNI.cpp $(JNI_CPPHEADERFILES)
@echo "Compiling SmartJNI.cpp"
@echo "Compiling SmartJNI.cpp"
@mkdir -p $(LIN64_BUILD_DIR)
@mkdir -p $(LIN64_BUILD_DIR)
@$(LIN64_GPP) $(LIN64_COMPILE_ARGS) -o $(LIN64_BUILD_DIR)/SmartJNI.o $(SRC_DIR)/SmartJNI.cpp
@$(LIN64_GPP) $(LIN64_COMPILE_ARGS) -o $(LIN64_BUILD_DIR)/SmartJNI.o $(SRC_DIR)/SmartJNI.cpp
#### WINDOWS BUILDING DIRECTIVES ####
#### WINDOWS BUILDING DIRECTIVES ####
$(DIST)/$(WIN_NAME): $(WINOBJFILES)
$(DIST)/$(WIN_NAME): $(WINOBJFILES)
@echo "Linking Windows Remote object files..."
@echo "Linking Windows Remote object files..."
@mkdir -p $(DIST)
@mkdir -p $(DIST)
@$(WIN_GPP) -Wl,$(SRC_DIR)/libsmartremote.def -static-libgcc -static-libstdc++ -mwindows -shared -s -o $(DIST)/$(WIN_NAME) $(WINOBJFILES) -lws2_32
@$(WIN_GPP) -Wl,$(SRC_DIR)/libsmartremote.def -static -static-libgcc -static-libstdc++ -mwindows -shared -s -m32 -o $(DIST)/$(WIN_NAME) $(WINOBJFILES) -lws2_32
$(DIST)/$(JNI_WIN_NAME): $(JNI_WINOBJFILES)
$(DIST)/$(JNI_WIN_NAME): $(JNI_WINOBJFILES)
@echo "Linking Windows JNI object files..."
@echo "Linking Windows JNI object files..."
@mkdir -p $(DIST)
@mkdir -p $(DIST)
@$(WIN_GPP) -Wl,$(SRC_DIR)/libsmartjni.def -static-libgcc -static-libstdc++ -mwindows -shared -s -o $(DIST)/$(JNI_WIN_NAME) $(JNI_WINOBJFILES)
@$(WIN_GPP) -Wl,$(SRC_DIR)/libsmartjni.def -static -static-libgcc -static-libstdc++ -mwindows -shared -s -m32 -o $(DIST)/$(JNI_WIN_NAME) $(JNI_WINOBJFILES)
$(WIN_BUILD_DIR)/SmartRemote.o: $(SRC_DIR)/SmartRemote.cpp $(CPPHEADERFILES)
$(WIN_BUILD_DIR)/SmartRemote.o: $(SRC_DIR)/SmartRemote.cpp $(CPPHEADERFILES)
@echo "Compiling SmartRemote.cpp"
@echo "Compiling SmartRemote.cpp"
@mkdir -p $(WIN_BUILD_DIR)
@mkdir -p $(WIN_BUILD_DIR)
@$(WIN_GPP) $(WIN_COMPILE_ARGS) -o $(WIN_BUILD_DIR)/SmartRemote.o $(SRC_DIR)/SmartRemote.cpp -lws2_32
@$(WIN_GPP) $(WIN_COMPILE_ARGS) -o $(WIN_BUILD_DIR)/SmartRemote.o $(SRC_DIR)/SmartRemote.cpp -lws2_32
$(WIN_BUILD_DIR)/SmartJNI.o: $(SRC_DIR)/SmartJNI.cpp $(JNI_CPPHEADERFILES)
$(WIN_BUILD_DIR)/SmartJNI.o: $(SRC_DIR)/SmartJNI.cpp $(JNI_CPPHEADERFILES)
@echo "Compiling SmartJNI.cpp"
@echo "Compiling SmartJNI.cpp"
@mkdir -p $(WIN_BUILD_DIR)
@mkdir -p $(WIN_BUILD_DIR)
@$(WIN_GPP) $(WIN_COMPILE_ARGS) -o $(WIN_BUILD_DIR)/SmartJNI.o $(SRC_DIR)/SmartJNI.cpp
@$(WIN_GPP) $(WIN_COMPILE_ARGS) -o $(WIN_BUILD_DIR)/SmartJNI.o $(SRC_DIR)/SmartJNI.cpp
#### WINDOWS64 BUILDING DIRECTIVES ####
#### WINDOWS64 BUILDING DIRECTIVES ####
$(DIST)/$(WIN64_NAME): $(WIN64OBJFILES)
$(DIST)/$(WIN64_NAME): $(WIN64OBJFILES)
@echo "Linking Windows64 Remote object files..."
@echo "Linking Windows64 Remote object files..."
@mkdir -p $(DIST)
@mkdir -p $(DIST)
@$(WIN64_GPP) -Wl,$(SRC_DIR)/libsmartremote.def -static-libgcc -static-libstdc++ -mwindows -shared -s -o $(DIST)/$(WIN64_NAME) $(WIN64OBJFILES) -lws2_32
@$(WIN64_GPP) -Wl,$(SRC_DIR)/libsmartremote.def -static -static-libgcc -static-libstdc++ -mwindows -shared -s -m64 -o $(DIST)/$(WIN64_NAME) $(WIN64OBJFILES) -lws2_32
$(DIST)/$(JNI_WIN64_NAME): $(JNI_WIN64OBJFILES)
$(DIST)/$(JNI_WIN64_NAME): $(JNI_WIN64OBJFILES)
@echo "Linking Windows64 JNI object files..."
@echo "Linking Windows64 JNI object files..."
@mkdir -p $(DIST)
@mkdir -p $(DIST)
@$(WIN64_GPP) -Wl,$(SRC_DIR)/libsmartjni.def -static-libgcc -static-libstdc++ -mwindows -shared -s -o $(DIST)/$(JNI_WIN64_NAME) $(JNI_WIN64OBJFILES)
@$(WIN64_GPP) -Wl,$(SRC_DIR)/libsmartjni.def -static -static-libgcc -static-libstdc++ -mwindows -shared -s -m64 -o $(DIST)/$(JNI_WIN64_NAME) $(JNI_WIN64OBJFILES)
$(WIN64_BUILD_DIR)/SmartRemote.o: $(SRC_DIR)/SmartRemote.cpp $(CPPHEADERFILES)
$(WIN64_BUILD_DIR)/SmartRemote.o: $(SRC_DIR)/SmartRemote.cpp $(CPPHEADERFILES)
@echo "Compiling SmartRemote.cpp"
@echo "Compiling SmartRemote.cpp"
@mkdir -p $(WIN64_BUILD_DIR)
@mkdir -p $(WIN64_BUILD_DIR)
@$(WIN64_GPP) $(WIN64_COMPILE_ARGS) -o $(WIN64_BUILD_DIR)/SmartRemote.o $(SRC_DIR)/SmartRemote.cpp -lws2_32
@$(WIN64_GPP) $(WIN64_COMPILE_ARGS) -o $(WIN64_BUILD_DIR)/SmartRemote.o $(SRC_DIR)/SmartRemote.cpp -lws2_32
$(WIN64_BUILD_DIR)/SmartJNI.o: $(SRC_DIR)/SmartJNI.cpp $(JNI_CPPHEADERFILES)
$(WIN64_BUILD_DIR)/SmartJNI.o: $(SRC_DIR)/SmartJNI.cpp $(JNI_CPPHEADERFILES)
@echo "Compiling SmartJNI.cpp"
@echo "Compiling SmartJNI.cpp"
@mkdir -p $(WIN64_BUILD_DIR)
@mkdir -p $(WIN64_BUILD_DIR)
@$(WIN64_GPP) $(WIN64_COMPILE_ARGS) -o $(WIN64_BUILD_DIR)/SmartJNI.o $(SRC_DIR)/SmartJNI.cpp
@$(WIN64_GPP) $(WIN64_COMPILE_ARGS) -o $(WIN64_BUILD_DIR)/SmartJNI.o $(SRC_DIR)/SmartJNI.cpp
#### JAVA BUILDING DIRECTIVES ####
#### JAVA BUILDING DIRECTIVES ####
$(JAVACLASSES): $(JAVASOURCES)
$(JAVACLASSES): $(JAVASOURCES)
@echo "Compiling Java Classes..."
@echo "Compiling Java Classes..."
@mkdir -p $(JAVA_BUILD_DIR)
@mkdir -p $(JAVA_BUILD_DIR)
@$(JAVAC) -classpath $(JAVA_BUILD_DIR) -sourcepath $(SRC_DIR) -d $(JAVA_BUILD_DIR) $(JAVASOURCES)
@$(JAVAC) -classpath $(JAVA_BUILD_DIR) -sourcepath $(SRC_DIR) -d $(JAVA_BUILD_DIR) $(JAVASOURCES)
@echo "Creating JAR Archive..."
@echo "Creating JAR Archive..."
@mkdir -p $(DIST)
@mkdir -p $(DIST)
@$(JAR) cfe $(DIST)/$(JAVA_NAME) smart.Main -C $(JAVA_BUILD_DIR) .
@$(JAR) cfe $(DIST)/$(JAVA_NAME) smart.Main -C $(JAVA_BUILD_DIR) .