Skip to content

Commit

Permalink
Add support for Forge project.
Browse files Browse the repository at this point in the history
Symlinking to Forge dist dir and removing old local build rules.
  • Loading branch information
davidlehn committed Jul 12, 2010
1 parent ee211af commit 4f903a7
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 25 deletions.
1 change: 1 addition & 0 deletions Makefile.in
Expand Up @@ -145,6 +145,7 @@ all: link-monarch-libs link-monarch-bins
@$(foreach dir,$(SUBDIRS),$(MAKE_DIR) build-objects build-libraries &&) true
@$(foreach dir,$(EXECUTABLE_SUBDIRS),$(MAKE_DIR) build-executables &&) true
@$(foreach dir,$(FLASH_SUBDIRS),$(MAKE_DIR) build-flash &&) true
@$(foreach dir,$(SUBDIRS),$(MAKE_DIR) build-extra &&) true
@$(MAKE_CMD) link-modules

clean:
Expand Down
43 changes: 21 additions & 22 deletions cpp/apps/bitmunk/Makefile.in
Expand Up @@ -10,15 +10,24 @@ DYNAMIC_LINK_LIBRARIES = mort momodest moutil moio mologging mocrypto monet moht
DYNAMIC_LINUX_LINK_LIBRARIES = pthread crypto ssl expat sqlite3
DYNAMIC_WINDOWS_LIBRARIES = sqlite3

EXTRA_WINDOWS_LIBRARIES = $(WINDOWS_LIB_DIR)/pthreadGCE2.dll $(WINDOWS_LIB_DIR)/libeay32.dll $(WINDOWS_LIB_DIR)/ssleay32.dll $(WINDOWS_LIB_DIR)/libexpat.dll $(WINDOWS_LIB_DIR)/sqlite3.dll -lws2_32
EXTRA_WINDOWS_LIBRARIES = \
$(WINDOWS_LIB_DIR)/pthreadGCE2.dll \
$(WINDOWS_LIB_DIR)/libeay32.dll \
$(WINDOWS_LIB_DIR)/ssleay32.dll \
$(WINDOWS_LIB_DIR)/libexpat.dll \
$(WINDOWS_LIB_DIR)/sqlite3.dll \
-lws2_32

# conditional Flash build
ifeq (@BUILD_FLASH@,yes)
ALL_FLASH = content/test/Test.swf content/HttpPoolManager.swf content/SocketPool.swf
ALL_FLASH = content/test/Test.swf content/HttpPoolManager.swf
endif

#ALL_MIN_JS = $(find ...)

# need a symlink to forge js/swf dir
ALL_EXTRA = content/js/forge

# ----------- Standard Makefile
include @BITMUNK_DIR@/setup/Makefile.base

Expand All @@ -29,23 +38,13 @@ else
FLASH_FLAGS = -define=CONFIG::debugging,false -define=CONFIG::release,true
endif

content/test/Test.swf: flash/Test.as flash/db/net/*.as flash/as3crypto/*.swc
@echo "Building $@..."
$(PCMD) @MXMLC@ $(FLASH_FLAGS) \
-load-config+=build-flash.xml \
-debug=@MXMLC_DEBUG_MODE@ \
-output=$@ $<

content/HttpPoolManager.swf: flash/HttpPoolManager.as flash/db/net/*.as flash/as3crypto/*.swc
@echo "Building $@..."
$(PCMD) @MXMLC@ $(FLASH_FLAGS) \
-load-config+=build-flash.xml \
-debug=@MXMLC_DEBUG_MODE@ \
-output=$@ $<

content/SocketPool.swf: flash/SocketPool.as flash/PooledSocket.as flash/SocketEvent.as
@echo "Building $@..."
$(PCMD) @MXMLC@ $(FLASH_FLAGS) \
-load-config+=build-flash.xml \
-debug=@MXMLC_DEBUG_MODE@ \
-output=$@ $<
#content/example/Flash.swf: flash/Flash.as
# @echo "Building $@..."
# $(PCMD) @MXMLC@ $(FLASH_FLAGS) \
# -load-config+=build-flash.xml \
# -debug=@MXMLC_DEBUG_MODE@ \
# -output=$@ $<

content/js/forge: @FORGE_DIR@
@echo "Linking $< to $@..."
$(PCMD) ln -sf $< $@
13 changes: 10 additions & 3 deletions setup/Makefile.base.in
@@ -1,9 +1,11 @@
# This file contains basic Makefile includes that contain all
# common building instructions for all binaries and packages.

.PHONY: all build-setup build-clean build-directories build-headers build-objects build-libraries build-executables build-xpts build-flash build-min-js clean clean-objects clean-libraries clean-executables clean-flash clean-min-js clean-xpts
.PHONY: all \
build-setup build-clean build-directories build-headers build-objects build-libraries build-executables build-xpts build-flash build-min-js build-extra \
clean clean-objects clean-libraries clean-executables clean-flash clean-min-js clean-xpts clean-extra

all: build-headers build-objects build-libraries build-executables build-flash build-min-js build-xpts
all: build-headers build-objects build-libraries build-executables build-flash build-min-js build-xpts build-extra

PLATFORM=@BITMUNK_PLATFORM@
BUILD_FOR_LINUX=@BUILD_FOR_LINUX@
Expand Down Expand Up @@ -110,7 +112,7 @@ build-clean:
$(ALL_DIRECTORIES):
mkdir -p $@

clean: build-clean clean-objects clean-libraries clean-executables clean-flash clean-min-js clean-xpts
clean: build-clean clean-objects clean-libraries clean-executables clean-flash clean-min-js clean-xpts clean-extra

build-headers: $(ALL_HEADERS)

Expand All @@ -126,6 +128,8 @@ build-min-js: $(ALL_DIRECTORIES) $(ALL_MIN_JS)

build-xpts: $(ALL_DIRECTORIES) $(ALL_XPTS)

build-extra: $(ALL_DIRECTORIES) $(ALL_EXTRA)

clean-executables:
$(PCMD) rm -rf $(ALL_EXECUTABLES)

Expand All @@ -137,3 +141,6 @@ clean-min-js:

clean-xpts:
$(PCMD) rm -rf $(ALL_GENERATED_HEADERS) $(ALL_XPTS)

clean-extra:
$(PCMD) rm -rf $(ALL_EXTRA)
25 changes: 25 additions & 0 deletions setup/configure.ac
Expand Up @@ -585,6 +585,30 @@ AC_SUBST(BUILD_GTK_UI)
AC_SUBST(GTK_INCLUDES)
AC_SUBST(GTK_LIBS)

dnl ----------------- Forge dir -----------------

dnl Location of Forge dir.
FORGE_DIR="$BITMUNK_DIR/../forge/dist/forge"

AC_ARG_WITH(forge-dir,
AC_HELP_STRING([--with-forge-dir=DIR],
[use DIR for Forge JavaScript [BITMUNK_DIR/../forge/dist/forge]]),
[
case "${withval}" in
yes) AC_MSG_ERROR(bad value ${withval} for --with-forge-dir) ;;
no) AC_MSG_ERROR(bad value ${withval} for --with-forge-dir) ;;
*) FORGE_DIR="${withval}" ;;
esac
],
[:]) dnl Default value

dnl Check Forge available.
if test ! -d "$FORGE_DIR"; then
AC_MSG_ERROR(Forge dir "$FORGE_DIR" not found. Use --with-forge-dir.)
fi

AC_SUBST(FORGE_DIR)

dnl ----------------- mxmlc debug -----------------

if test "$BUILD_FIREFOX_PLUGIN" = "yes" ; then
Expand Down Expand Up @@ -950,5 +974,6 @@ fi

echo "BFP API Version : $BITMUNK_BFP_API_VERSION"
echo "GTK UI enabled : $BUILD_GTK_UI"
echo "Forge dir : $FORGE_DIR"
echo "Release build : $BITMUNK_RELEASE_MODE"

0 comments on commit 4f903a7

Please sign in to comment.