Commits

Christian Fischer committed 7aec915

build scripts improved / fixed

  • Participants
  • Parent commits a476243

Comments (0)

Files changed (6)

File build/android/build-support.xml

 		>
 			<arg value="${ndk.dir}/ndk-build" />
 			<arg value="clean" />
+			<arg value="WIESEL_DIR=${wiesel.dir}" />
 		</exec>
 	</target>
 
 		>
 			<arg value="${ndk.dir}/ndk-build" />
 			<arg value="-j${ndk.build.jobs}" />
+			<arg value="WIESEL_DIR=${wiesel.dir}" />
 		</exec>
 	</target>
 

File build/target-application.mk

 
 $(BUILD_BIN_DIR):
 	@mkdir -p $(BUILD_BIN_DIR)
+	
+	@for file in $(strip $(CP_LIBRARY_PATHS))/*$(SHARED_LIBRARY_EXTENSION); do \
+		$(COPY) $$file $(BUILD_BIN_DIR); \
+	done;
 
 
 

File config/config-windows-i686.mk

 C_FLAGS				+= -DWIESEL_USE_LIBSDL
 LD_LIBRARIES			+= SDL SDL_image opengl32
 LD_LIBRARY_PATHS		+= 
+CP_LIBRARY_PATHS		+= 
 
 OBJECTFILE_EXTENSION		:= .obj
 EXECUTABLE_EXTENSION		:= .exe

File config/tools-default.mk

 COMPILE.C		:= gcc
 COMPILE.CPP		:= g++
 LINK			:= g++
+COPY			:= cp
 
 # C compiler flags
 C_FLAGS			:=
 LD_LIBRARIES		:=
 
 # linker flags
-LD_FLAGS		:=
+LD_FLAGS		:=
+
+# paths where to copy binary libraries from into the target dir
+CP_LIBRARY_PATHS	:=
+

File samples/HelloWiesel/android/AndroidManifest.xml

 			<!-- Tell NativeActivity the name of or .so -->
 			<meta-data
 					android:name="android.app.lib_name"
-            		android:value="HelloWiesel" />
+					android:value="main" />
 			<intent-filter>
 				<action android:name="android.intent.action.MAIN" />
 				<category android:name="android.intent.category.LAUNCHER" />

File samples/HelloWiesel/android/jni/Android.mk

 include $(CLEAR_VARS)
 
 # add the path to the libraries into search path
-WIESEL_PATH := $(LOCAL_PATH)/../../../../libraries/android-native/
+WIESEL_PATH := $(LOCAL_PATH)/../$(WIESEL_DIR)/libraries/android-native
 $(call import-add-path,$(WIESEL_PATH))
 
 # define the source folders of this project
 				$(subst $(LOCAL_PATH), ,$(foreach dir,$(MY_SUBFOLDERS),$(wildcard $(dir)/*.cpp)))
 
 # configure the application's build
-LOCAL_MODULE               := HelloWiesel
+LOCAL_MODULE               := main
 LOCAL_SRC_FILES            := $(MY_FILES)
 LOCAL_LDLIBS               :=
 LOCAL_STATIC_LIBRARIES     := wiesel-common