From e1c48e06b3408e05a727ac74457c90b9f2017142 Mon Sep 17 00:00:00 2001 From: Clifford Hung Date: Fri, 13 Apr 2012 16:20:47 -0400 Subject: [PATCH] Remove QMake-based files and add Makefiles needed to do a recursive make from the top level directory --- Makefile | 1 + README.md | 29 ++----------------- cpp/Makefile | 1 + cpp/core/Makefile | 51 +--------------------------------- cpp/core/tests/Makefile.dnm | 0 cpp/ios.xcodeproj/Makefile.dnm | 0 cpp/osx.xcodeproj/Makefile.dnm | 0 cpp/scons/Makefile.dnm | 0 8 files changed, 5 insertions(+), 77 deletions(-) create mode 100644 Makefile create mode 100644 cpp/Makefile create mode 100644 cpp/core/tests/Makefile.dnm create mode 100644 cpp/ios.xcodeproj/Makefile.dnm create mode 100644 cpp/osx.xcodeproj/Makefile.dnm create mode 100644 cpp/scons/Makefile.dnm diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..0405fe9fc2 --- /dev/null +++ b/Makefile @@ -0,0 +1 @@ +include recurse.mk diff --git a/README.md b/README.md index 3a2f676c3d..6cb0e8d587 100644 --- a/README.md +++ b/README.md @@ -8,25 +8,8 @@ Please direct all inquiries about zxing to Clifford Hung (chung@rim.com). - Blackberry Native SDK (NDK) for Tablet OS -For QMake-based build: -- Cascades add-on (needed for QMake) - ### Build instructions -For the QMake-based build: -1. Launch the NDK's IDE. -2. Open the "File" menu and click "Import..." -3. Click on "General" when the "Import" window appears. -4. Click on "Existing Projects into Workspace" when it appears. -5. Click "Next" button. -6. Click "Browse..." button next to "Select Root Directory" label. -7. Navigate to your local copy of zxing. Then navigate to the cpp/core directory inside it. -8. Click "Ok" button. -9. Click the "Copy projects into work space" checkbox. -10. Click "Finish" button. -11. "zxing" will appear in your "Project Explorer". Right click it and click "Build Project" from the menu that appears. - -For the recursive makefile based build: 1. Source the bbndk-env.sh from the NDK installation directory (e.g. ". ./bbndk-env.sh") 2. From the command-line, change to the zxing/cpp/core/lib directory. 3. Run make to produce release and debug builds of the ZXing library for ARM and X86. Static libraries are only produced for ARM so that they can be included in the test binary. @@ -35,20 +18,12 @@ For the recursive makefile based build: The CppUnit library is required to compile the unit tests. A port is hosted at git@github.rim.net:/chung/cppunit.git. Please clone that repo and follow the same general instructions above except navigating to the root directory of the CppUnit module. -For the QMake-based build: -1. Import the zxing-tests project from cpp/core/tests in zxing following the same general instructions for building zxing. - -For the recursive makefile based build: 1. Ensure that the cppunit project is located at the same directory level as the zxing project, as this is what the Makefile expects. -1. From the command-line, change to the zxing/cpp/core/test_app directory. -2. Run make to produce release and debug builds of the test binary (zxing-test) for ARM. +2. From the command-line, change to the zxing/cpp/core/test_app directory. Delete the file Makefile.dnm, so that make will run in this directory. +4. Run make to produce release and debug builds of the test binary (zxing-test) for ARM. ### Notes -For the QMake-based build: -- Building on Windows from command-line and IDE works. Mac and Linux have not been tested. - -For the recursive makefile based build: - Building on Linux from command-line works. Mac and Windows have not been tested. ### TODO diff --git a/cpp/Makefile b/cpp/Makefile new file mode 100644 index 0000000000..0405fe9fc2 --- /dev/null +++ b/cpp/Makefile @@ -0,0 +1 @@ +include recurse.mk diff --git a/cpp/core/Makefile b/cpp/core/Makefile index f2e42bfbe3..0405fe9fc2 100644 --- a/cpp/core/Makefile +++ b/cpp/core/Makefile @@ -1,50 +1 @@ -# -# Copyright (c) 2011, 2012 Research In Motion Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -QMAKE_TARGET = zxing -QMAKE = $(QNX_HOST)/usr/bin/qmake -TARGET = $(QMAKE_TARGET) - - -all: Makefile $(QMAKE_TARGET) - -clean: - $(MAKE) -C ./arm -f Makefile distclean - $(MAKE) -C ./x86 -f Makefile distclean - - -Makefile: FORCE - $(QMAKE) -spec unsupported/blackberry-armv7le-g++ -o arm/Makefile $(QMAKE_TARGET).pro CONFIG+=device - $(QMAKE) -spec unsupported/blackberry-x86-g++ -o x86/Makefile $(QMAKE_TARGET).pro CONFIG+=simulator - -FORCE: - -$(QMAKE_TARGET): device simulator - -device: - $(MAKE) -C ./arm -f Makefile all - -Device-Debug: Makefile - $(MAKE) -C ./arm -f Makefile debug - -Device-Release: Makefile - $(MAKE) -C ./arm -f Makefile release - -simulator: - $(MAKE) -C ./x86 -f Makefile all - -Simulator-Debug: Makefile - $(MAKE) -C ./x86 -f Makefile debug +include recurse.mk diff --git a/cpp/core/tests/Makefile.dnm b/cpp/core/tests/Makefile.dnm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cpp/ios.xcodeproj/Makefile.dnm b/cpp/ios.xcodeproj/Makefile.dnm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cpp/osx.xcodeproj/Makefile.dnm b/cpp/osx.xcodeproj/Makefile.dnm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/cpp/scons/Makefile.dnm b/cpp/scons/Makefile.dnm new file mode 100644 index 0000000000..e69de29bb2