Skip to content

Commit

Permalink
[wx] Cleanup Makefiles
Browse files Browse the repository at this point in the history
Remove old "outside" otp building support.
  • Loading branch information
dgud committed Feb 9, 2012
1 parent 6004ec3 commit c1aca0c
Show file tree
Hide file tree
Showing 15 changed files with 56 additions and 637 deletions.
54 changes: 5 additions & 49 deletions lib/wx/Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
#
# Copyright Ericsson AB 2008-2011. All Rights Reserved.
#
#
# Copyright Ericsson AB 2008-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
#
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
#
#
# %CopyrightEnd%
#

Expand All @@ -33,53 +33,9 @@ endif #TERTIARY_BOOTSTRAP

CLEANDIRS = $(SUBDIRS) api_gen

ifeq ($(INSIDE_ERLSRC),true)
# we are inside erl src
# ----------------------------------------------------
# Default Subdir Targets
# ----------------------------------------------------
SUB_DIRECTORIES=$(SUBDIRS)

include $(ERL_TOP)/make/otp_subdir.mk
else
# we are building standalone wxErlang
all: opt

opt:
@mkdir -p ebin
@mkdir -p priv
@mkdir -p c_src/$(SYS_TYPE)
@for d in $(SUBDIRS); do \
if test ! -d $$d ; then \
echo "=== Skipping subdir $$d" ; \
else \
(cd $$d && $(MAKE) $@) ; \
fi ; \
done

# clean, removes beam, object and target files

clean:
rm -f *~
@for d in $(CLEANDIRS); do \
if test ! -d $$d ; then \
echo "=== Skipping subdir $$d" ; \
else \
(cd $$d && $(MAKE) $@) ; \
fi ; \
done

docs:
(cd doc/src/ && $(MAKE) $@)

prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@

install:
escript ./install.es $(INSTALLDIR)

release:
escript ./install.es --create_release

endif
60 changes: 0 additions & 60 deletions lib/wx/Notes

This file was deleted.

35 changes: 3 additions & 32 deletions lib/wx/README
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

REQUIREMENTS:
At least Erlang-R13B with smp enabled. It Requires unicode support.

Expand All @@ -10,17 +9,11 @@ REQUIREMENTS:
And I have given up on Solaris-8|9, wxWidgets on my old gtk version
doesn't run well, 7 of 10 wxWidgets examples seg fault.
Some early tests show that Solaris 10 works, though.

INSTALLING:
The prebuilt (windows and mac) version can be installed by invoking:
install.es
or
/PATH/TO/ERL/bin/escript install.es

BUILDING:
You will need wxWidgets-2.8.*

On mac I built wxwidgets with:
On mac (snow leopard) I built wxwidgets with:

mkdir MYBUILD; cd MYBUILD
../configure --with-opengl --enable-unicode --enable-graphics_ctx \
Expand All @@ -30,6 +23,8 @@ BUILDING:
cd contrib/src/stc/
make && make install

Or grab them prebuilt from macports.

On linux I have used the wxwidgets-libraries that came with
the distribution. It requires wxStyledTextControl which was
prebuilt on my linux, otherwise you have to build wxWidgets
Expand All @@ -48,30 +43,6 @@ BUILDING:
I havn't tested on cygwin at all.
You need to use werl on windows, erl (non-gui) hangs wxwidgets startup.

make
should work if erl, gcc and g++ and wx-config is found in path.


HELPING:
See TODO list.
Use it, i.e. write code which tests the library, submit tests.
See api_gen/Readme for improving the code generation.
My C++ knowledge isn't the best, send patches and explain why
so I can learn something.

STATUS:
Testing I havn't done more testing than the code in test directory.
So please help by testing and writing test suites.
Most classes needs some argument tweaking (in wxapi.conf) to
work as expected, but I havn't read all the documentation and
gone through every argument on every function.

See (and run) the demo in the examples directory.

This library is (currently) a driver, so if the you (or I) make errors,
such as accessing deleted objects or other things wxWidgets didn't
expect you to do, erlang will crash hard.

Cheers
Dan Gudmundsson

30 changes: 0 additions & 30 deletions lib/wx/TODO

This file was deleted.

2 changes: 1 addition & 1 deletion lib/wx/api_gen/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
# Copyright Ericsson AB 2008-2010. All Rights Reserved.
# Copyright Ericsson AB 2008-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
Expand Down
14 changes: 1 addition & 13 deletions lib/wx/c_src/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
# Copyright Ericsson AB 2008-2011. All Rights Reserved.
# Copyright Ericsson AB 2008-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
Expand Down Expand Up @@ -45,20 +45,11 @@ GL_H = egl_impl.h gen/glu_finit.h gen/gl_finit.h gen/gl_fdefs.h
HAVE_OPENGL = true
OPENGL_F = gl_funcs egl_impl

ifneq ($(INSIDE_ERLSRC),true)

ERL_DIR = @ERLANG_ROOT_DIR@
ERL_INCS = -I$(ERL_DIR)/usr/include

else

include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp_ded.mk

ERL_INCS= $(DED_INCLUDES)

endif

SYS_TYPE = @WXERL_SYS_TYPE@

GENERAL_O = $(GENERAL:%=$(SYS_TYPE)/%.o)
Expand Down Expand Up @@ -183,7 +174,6 @@ $(TARGET_DIR)/erl_gl$(SO_EXT): $(GL_OBJECTS)
# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
ifeq ($(INSIDE_ERLSRC),true)
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)/priv
Expand All @@ -193,5 +183,3 @@ release_spec: opt
$(INSTALL_PROGRAM) $(TARGET_DIR)/erl_gl$(SO_EXT) $(RELSYSDIR)/priv/

release_docs_spec:

endif
Loading

0 comments on commit c1aca0c

Please sign in to comment.