Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Commit

Permalink
Remove QMake-based files and add Makefiles needed to do a recursive m…
Browse files Browse the repository at this point in the history
…ake from

the top level directory
  • Loading branch information
hungc committed Apr 13, 2012
1 parent d95601a commit e1c48e0
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 77 deletions.
1 change: 1 addition & 0 deletions Makefile
@@ -0,0 +1 @@
include recurse.mk
29 changes: 2 additions & 27 deletions README.md
Expand Up @@ -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.
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions cpp/Makefile
@@ -0,0 +1 @@
include recurse.mk
51 changes: 1 addition & 50 deletions 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
Empty file added cpp/core/tests/Makefile.dnm
Empty file.
Empty file added cpp/ios.xcodeproj/Makefile.dnm
Empty file.
Empty file added cpp/osx.xcodeproj/Makefile.dnm
Empty file.
Empty file added cpp/scons/Makefile.dnm
Empty file.

0 comments on commit e1c48e0

Please sign in to comment.