# -*- Makefile -*- # # This is a make+ file. Make+ is a set of scripts which enhance GNU # make and let you build RPMs, and other package types with just one # control file. To build this package you will need to download make+ # from this site: http://www.annexia.org/freeware/makeplus/ PACKAGE := monolith VERSION_MAJOR := 1 VERSION_MINOR := 2.0 VERSION := $(VERSION_MAJOR).$(VERSION_MINOR) SUMMARY := a framework for web applications COPYRIGHT := GNU LGPL AUTHOR := Richard W.M. Jones define DESCRIPTION Monolith is a framework for web applications. Instead of thinking of your web application as a series of pages and forms, Monolith gives you basic widgets like buttons, images, form fields, tables and so on, which you can use to build up your web application or construct reusable "super-widgets". In this way, building a web application is rather like constructing a traditional GUI application using Gtk, Motif, Windows/MFC, Java/JFC, etc. Monolith applications are written in C or C++ (we may support other languages in future, particularly Perl and Java). Monolith applications compile down to standalone shared object scripts which can be run directly from the rws micro web server. Monolith comes with a full featured discussion system, chat server and calendar. endef RPM_REQUIRES := rws >= 1.2.0, pthrlib >= 3.3.0, c2lib >= 1.4.0 RPM_GROUP := Development/Libraries iconsdir = $(datadir)/rws/ml-icons solibdir = $(datadir)/rws/so-bin sqldir = $(datadir)/rws/sql styledir = $(datadir)/rws/ml-styles symtabsdir = $(datadir)/rws/symtabs botsdir = $(pkgdatadir)/chat/bots CFLAGS += -Wall -Werror -g -O2 -I$(srcdir)/src -I$(srcdir)/widgets \ -DSYMTABSDIR=\"$(symtabsdir)\" -D_GNU_SOURCE \ -I$(includedir)/c2lib ifneq ($(shell uname), SunOS) # Avoid a warning about reordering system include paths. CFLAGS += $(shell pcre-config --cflags) endif LIBS += -lrws -lpthrlib -lc2lib -lpq $(shell pcre-config --libs) -lm LOBJS := src/ml_smarttext.lo \ src/text.lo \ src/monolith.lo \ src/ml_box.lo \ src/ml_button.lo \ src/ml_close_button.lo \ src/ml_dialog.lo \ src/ml_flow_layout.lo \ src/ml_form.lo \ src/ml_form_checkbox.lo \ src/ml_form_input.lo \ src/ml_form_layout.lo \ src/ml_form_password.lo \ src/ml_form_radio.lo \ src/ml_form_radio_group.lo \ src/ml_form_select.lo \ src/ml_form_submit.lo \ src/ml_form_text.lo \ src/ml_form_textarea.lo \ src/ml_heading.lo \ src/ml_horizontal_layout.lo \ src/ml_iframe.lo \ src/ml_image.lo \ src/ml_label.lo \ src/ml_menu.lo \ src/ml_multicol_layout.lo \ src/ml_select_layout.lo \ src/ml_table_layout.lo \ src/ml_text_label.lo \ src/ml_toggle_button.lo\ src/ml_vertical_layout.lo \ src/ml_widget.lo \ src/ml_window.lo HEADERS := $(srcdir)/src/ml_smarttext.h \ $(srcdir)/src/monolith.h \ $(srcdir)/src/ml_box.h \ $(srcdir)/src/ml_button.h \ $(srcdir)/src/ml_close_button.h \ $(srcdir)/src/ml_dialog.h \ $(srcdir)/src/ml_flow_layout.h \ $(srcdir)/src/ml_form.h \ $(srcdir)/src/ml_form_checkbox.h \ $(srcdir)/src/ml_form_input.h \ $(srcdir)/src/ml_form_layout.h \ $(srcdir)/src/ml_form_password.h \ $(srcdir)/src/ml_form_radio.h \ $(srcdir)/src/ml_form_radio_group.h \ $(srcdir)/src/ml_form_select.h \ $(srcdir)/src/ml_form_submit.h \ $(srcdir)/src/ml_form_text.h \ $(srcdir)/src/ml_form_textarea.h \ $(srcdir)/src/ml_heading.h \ $(srcdir)/src/ml_horizontal_layout.h \ $(srcdir)/src/ml_iframe.h \ $(srcdir)/src/ml_image.h \ $(srcdir)/src/ml_label.h \ $(srcdir)/src/ml_menu.h \ $(srcdir)/src/ml_multicol_layout.h \ $(srcdir)/src/ml_select_layout.h \ $(srcdir)/src/ml_table_layout.h \ $(srcdir)/src/ml_text_label.h \ $(srcdir)/src/ml_toggle_button.h \ $(srcdir)/src/ml_vertical_layout.h \ $(srcdir)/src/ml_widget.h \ $(srcdir)/src/ml_window.h WIDGETS_LOBJS := widgets/ml_bulletins.lo \ widgets/ml_login_nopw.lo \ widgets/ml_msp.lo \ widgets/ml_user_directory.lo WIDGETS_HEADERS := $(srcdir)/widgets/ml_bulletins.h \ $(srcdir)/widgets/ml_login_nopw.h \ $(srcdir)/widgets/ml_msp.h \ $(srcdir)/widgets/ml_user_directory.h APPS := apps/msp.so apps/stats.so EXAMPLES := examples/01_label_and_button.so examples/02_toy_calculator.so \ examples/03_many_toy_calculators.so \ examples/04_animal_vegetable_mineral.so \ examples/05_popup_windows_and_frames.so \ examples/06_big_form.so examples/07_toggle_buttons.so \ examples/08_menus.so # examples/expenses.so CALENDAR_LOBJS := calendar/ml_calendar.lo \ calendar/ml_calendar_day.lo \ calendar/ml_calendar_lib.lo \ calendar/ml_calendar_month.lo \ calendar/ml_calendar_notes.lo \ calendar/ml_calendar_visible.lo CALENDAR_HEADERS := $(srcdir)/calendar/ml_calendar.h CHAT_LOBJS := chat/chatroom.lo \ chat/lib.lo \ chat/message.lo \ chat/messages_pane.lo \ chat/ml_chat_button.lo \ chat/ml_chat_window.lo \ chat/thread.lo \ chat/users_pane.lo CHAT_HEADERS := $(srcdir)/chat/ml_chat_button.h \ $(srcdir)/chat/ml_chat_window.h CHAT_BOTS := $(wildcard $(srcdir)/chat/bots/*.pl) DISCUSSION_LOBJS := discussion/ml_discussion.lo \ discussion/ml_discussion_panel.lo DISCUSSION_HEADERS := $(srcdir)/discussion/ml_discussion.h \ $(srcdir)/discussion/ml_discussion_panel.h all: build # XXX Test for flex. configure: $(MP_CONFIGURE_START) $(MP_CHECK_LIB) precomp c2lib $(MP_CHECK_LIB) current_pth pthrlib $(MP_CHECK_LIB) new_rws_request rws $(MP_CHECK_FUNCS) dladdr $(MP_CHECK_HEADERS) arpa/inet.h assert.h dlfcn.h fcntl.h \ netinet/in.h string.h sys/socket.h sys/types.h time.h unistd.h $(MP_CONFIGURE_END) build: src/libmonolithcore.so widgets/libmonolithwidgets.so \ $(APPS) $(EXAMPLES) \ calendar/libmonolithcalendar.so \ chat/libmonolithchat.so \ discussion/libmonolithdiscussion.so \ manpages syms # chat/chatbot.so \ # Build the core library. src/libmonolithcore.so: $(LOBJS) $(MP_LINK_DYNAMIC) $@ $^ $(LIBS) src/ml_smarttext.c: src/ml_smarttext.l flex -B -8 -Cem -Pml_smarttext_ -i $< mv lex.ml_smarttext_.c $@ # Build the widgets library. widgets/libmonolithwidgets.so: $(WIDGETS_LOBJS) $(MP_LINK_DYNAMIC) $@ $^ $(LIBS) # Build the applications. apps/%.so: apps/%.lo ifneq ($(shell uname), SunOS) $(CC) $(CFLAGS) -shared -Wl,-soname,$@ $^ \ -Lwidgets -lmonolithwidgets -Lsrc -lmonolithcore $(LIBS) -o $@ else # XXX make+ needs to support this. $(CC) $(CFLAGS) -shared -Wl,-h,$@ $^ \ -Lwidgets -lmonolithwidgets -Lsrc -lmonolithcore $(LIBS) -o $@ endif # Build the example programs. examples/03_many_toy_calculators.so: examples/03_many_toy_calculators.lo \ examples/toy_calculator.lo ifneq ($(shell uname), SunOS) $(CC) $(CFLAGS) -shared -Wl,-soname,$@ $^ \ -Lwidgets -lmonolithwidgets -Lsrc -lmonolithcore $(LIBS) -o $@ else # XXX make+ needs to support this. $(CC) $(CFLAGS) -shared -Wl,-h,$@ $^ \ -Lwidgets -lmonolithwidgets -Lsrc -lmonolithcore $(LIBS) -o $@ endif examples/expenses.so: examples/expenses.lo examples/expenses_widget.lo ifneq ($(shell uname), SunOS) $(CC) $(CFLAGS) -shared -Wl,-soname,$@ $^ \ -Lwidgets -lmonolithwidgets -Lsrc -lmonolithcore $(LIBS) -o $@ else # XXX make+ needs to support this. $(CC) $(CFLAGS) -shared -Wl,-h,$@ $^ \ -Lwidgets -lmonolithwidgets -Lsrc -lmonolithcore $(LIBS) -o $@ endif ifeq ($(shell uname), OpenBSD) # .. This is required for unknown reasons by OpenBSD. examples/04_animal_vegetable_mineral.so: \ examples/04_animal_vegetable_mineral.lo $(CC) $(CFLAGS) -shared $^ \ -Lwidgets -lmonolithwidgets -Lsrc -lmonolithcore $(LIBS) -o $@ endif examples/%.so: examples/%.lo ifneq ($(shell uname), SunOS) $(CC) $(CFLAGS) -shared -Wl,-soname,$@ $^ \ -Lwidgets -lmonolithwidgets -Lsrc -lmonolithcore $(LIBS) -o $@ else # XXX make+ needs to support this. $(CC) $(CFLAGS) -shared -Wl,-h,$@ $^ \ -Lwidgets -lmonolithwidgets -Lsrc -lmonolithcore $(LIBS) -o $@ endif # Build the calendar. calendar/libmonolithcalendar.so: $(CALENDAR_LOBJS) $(MP_LINK_DYNAMIC) $@ $^ -Lwidgets -lmonolithwidgets \ -Lsrc -lmonolithcore $(LIBS) # Build the chat server. chat/libmonolithchat.so: $(CHAT_LOBJS) $(MP_LINK_DYNAMIC) $@ $^ -Lwidgets -lmonolithwidgets \ -Lsrc -lmonolithcore $(LIBS) chat/chatbot.so: chat/chatbot.lo ifneq ($(shell uname), SunOS) $(CC) $(CFLAGS) -shared -Wl,-soname,$@ $^ $(LIBS) -o $@ else # XXX make+ should provide a way to do this $(CC) $(CFLAGS) -shared -Wl,-h,$@ $^ $(LIBS) -o $@ endif # Build the discussion system. discussion/libmonolithdiscussion.so: $(DISCUSSION_LOBJS) $(MP_LINK_DYNAMIC) $@ $^ -Lwidgets -lmonolithwidgets \ -Lsrc -lmonolithcore $(LIBS) # Build all the manpages. manpages: $(HEADERS) $(WIDGETS_HEADERS) $(CALENDAR_HEADERS) \ $(CHAT_HEADERS) $(DISCUSSION_HEADERS) if cdoc; then \ rm -f *.3; \ cdoc \ --author '$(AUTHOR)' \ --license '$(COPYRIGHT)' \ --version '$(PACKAGE)-$(VERSION)' \ $^; \ fi # Build all the symbol tables. syms: src/libmonolithcore.syms widgets/libmonolithwidgets.syms \ apps_syms examples_syms src/libmonolithcore.syms: src/libmonolithcore.so nm $< | sort | grep -i '^[0-9a-f]' | awk '{print $$1 " " $$3}' > $@ widgets/libmonolithwidgets.syms: widgets/libmonolithwidgets.so nm $< | sort | grep -i '^[0-9a-f]' | awk '{print $$1 " " $$3}' > $@ apps_syms: $(patsubst %.so,%.syms,$(APPS)) apps/%.syms: apps/%.so nm $< | sort | grep -i '^[0-9a-f]' | awk '{print $$1 " " $$3}' > $@ examples_syms: $(patsubst %.so,%.syms,$(EXAMPLES)) examples/%.syms: examples/%.so nm $< | sort | grep -i '^[0-9a-f]' | awk '{print $$1 " " $$3}' > $@ test: install: install -d $(DESTDIR)$(libdir) install -d $(DESTDIR)$(includedir) install -d $(DESTDIR)$(iconsdir) install -d $(DESTDIR)$(man3dir) install -d $(DESTDIR)$(solibdir) install -d $(DESTDIR)$(sqldir) install -d $(DESTDIR)$(styledir) install -d $(DESTDIR)$(symtabsdir) install -d $(DESTDIR)$(botsdir) $(MP_INSTALL_DYNAMIC_LIB) src/libmonolithcore.so $(MP_INSTALL_DYNAMIC_LIB) widgets/libmonolithwidgets.so $(MP_INSTALL_DYNAMIC_LIB) calendar/libmonolithcalendar.so $(MP_INSTALL_DYNAMIC_LIB) chat/libmonolithchat.so $(MP_INSTALL_DYNAMIC_LIB) discussion/libmonolithdiscussion.so install -m 0644 $(HEADERS) \ $(WIDGETS_HEADERS) \ $(CALENDAR_HEADERS) \ $(CHAT_HEADERS) \ $(DISCUSSION_HEADERS) \ $(DESTDIR)$(includedir) install -m 0644 $(srcdir)/icons/*.png $(DESTDIR)$(iconsdir) install -m 0644 *.3 $(DESTDIR)$(man3dir) install -m 0755 $(APPS) $(EXAMPLES) $(DESTDIR)$(solibdir) # install -m 0755 chatbot.so $(DESTDIR)$(solibdir) install -m 0644 $(srcdir)/sql/*.sql $(DESTDIR)$(sqldir) install -m 0644 $(srcdir)/default.css $(DESTDIR)$(styledir) install -m 0644 */*.syms $(DESTDIR)$(symtabsdir) install -m 0755 $(CHAT_BOTS) $(DESTDIR)$(botsdir) define WEBSITE <% include page_header.msp %>

$(PACKAGE) - $(SUMMARY)

Monolith is a framework for web applications. Instead of thinking of your web application as a series of pages and forms, Monolith gives you basic widgets like buttons, images, form fields, tables and so on, which you can use to build up your web application or construct reusable super-widgets. In this way, building a web application is rather like constructing a traditional GUI application using Gtk, Motif, Windows/MFC, Java/JFC, etc.

Monolith applications are written in C or C++ (we may support other languages in future, particularly Perl and Java).

Monolith applications compile down to standalone shared object scripts which can be run directly from the rws micro web server.

Monolith comes with a full-featured discussion system, chat server and calendar.

There is extensive documentation and a tutorial here.

Download

You will need to install the complete tool-chain before installing monolith:

Always make sure you have the latest versions installed!

File Format Contents
$(PACKAGE)-$(VERSION).tar.gz tar.gz Latest source distribution
$(PACKAGE)-$(VERSION)-1.i686.rpm i686 binary RPM Binary libraries, header files, man pages for Red Hat Linux
$(PACKAGE)-$(VERSION)-1.src.rpm source RPM Source files for Red Hat Linux

Note: To rebuild the manual pages which come with the package, you will also need to download cdoc >= 0.9.2 (this is optional).

News

Sat Feb 8 17:00:47 GMT 2003: Ported to Solaris, OpenBSD and FreeBSD (thanks to Jeremy Sowden and Richard Baker for help and equipment). Removed all non-shared libraries. Allow uses to set class on div elements. Fixed many string escaping bugs. Fixed spelling mistakes in the documentation. Updated CSS for the bugtracker.

Sun Dec 8 17:23:47 GMT 2002: Builds using make+. Fixes to compile on RH 7.3. Changed to support current_pth API change in pthrlib. ml_login_nopw acts more conservatively with email addresses, possibly closing a security hole. Added ml_select_layout. Made the button widget more memory efficient. Allow widgets to widget properties. Changes to the stylesheet for discussion. Enabled debugging and optimisations. ml_window supports browser refresh (primarily for chat). Added two forgotten fclose calls in the stats code. Added ml_menu - initial support for pull-down menus. Integrated smart text into the core library. User agent now stored in the session, and shown in stats.

Mon Nov 25 09:31:37 GMT 2002: Added support for smart text, and updated widgets to support it. Better handling of session timeouts. Fixed kill_session to be race-free. Stats application now suports hit counts for sessions. Stats application can do full symbol resolution. Forms have names. Form text input fields can capture focus.

Sun Nov 17 23:31:32 GMT 2002: Debian packages. Added MSP files. Simplified the look of the ml_login_nopw widget. Added the icons directory. Added begin work ... commit work around SQL scripts. Install SQL in /usr/share/rws/sql/ directory. Install so scripts in /usr/share/rws/so-bin/. Added widget properties. Connection pooling completely rewritten and simplified. Added ml_die function. Added the ability to get the peername. Added ml_heading widget. Added CSS for commercial widgets. ml_msp now supports up to 5 arguments to the widget function (for chat). Close button allows opener window to be reloaded. Added tabbed layout widget (not working yet). Added ml_form_layout layout widget. Added ml_user_directory widget for bug tracker (not working yet). Added iframe widget. Support scroll_to for windows. Colours, tooltips, link types for buttons. Added more styles. Added styling for link buttons. Added class property for many of the widgets. Added close buttons, bulletins board widget. Multi-column, horizontal and vertical layout widgets. Added color property for text label widgets. Session structures are now properly locked to avoid potential data corruption.

Thu Nov 14 15:33:29 GMT 2002: Major checkpoint release for Monolith.

Sun Oct 20 15:04:07 BST 2002: Correct flags for PCRE. Many bug fixes to MSPs. User authentication. MSPs can now access the database. ml_bulletins allows you to post message, supports user authentication. Added a ml_close_button widget to core. Dialogs now support close buttons. Added ml_ok_window and ml_error_window. Allow forms to change their posting method. ml_text_label doesn't crash if there is no text. ml_login_nopw widget. Get the window ID of a window (required by the login widget). Nominate a "default" main window (required by MSPs). Provided a way to get at the original Host: header in the request. Fixed multiple bugs in persistent database handles. This version now requires a version of pthrlib which was compiled with DBI support.

Tue Oct 15 23:40:42 BST 2002: Multiple bug fixes.

Sat Sep 7 16:01:14 BST 2002: Packages are now available as i686 binary RPMs and source RPMs.

Old news and old versions

Sat Sep 7 14:48:24 BST 2002

monolith-1.0.1.tar.gz released. Documentation and tutorial. Fixed missing includes of (thanks to jjr-at-japo-dot-fi)

Fri Aug 30 15:28:57 BST 2002

monolith-1.0.0.tar.gz released. Full complement of form input widgets created.

Wed Aug 28 20:30:33 BST 2002

monolith-0.8.6.tar.gz released. This is a candidate for release as version 1.0. Added framesets, removed private data in session, removed explicit name parameters on form input fields.

Wed Aug 28 16:11:09 BST 2002

monolith-0.8.5.tar.gz released. More details in the README file on how to install monolith.

Wed Aug 28 15:41:50 BST 2002

monolith-0.8.4.tar.gz released. Support for multiple windows, improved CSS, improved support for forms.

Tue Aug 27 11:17:00 BST 2002

monolith-0.8.3.tar.gz released. This version has support for forms, and more example programs.

Sat Aug 24 16:55:21 BST 2002

monolith-0.8.2.tar.gz released. This fixes some bugs in the button widget, finishes off the toy calculator example, and improves the box widget.

Sat Aug 24 15:13:58 BST 2002

monolith-0.8.1.tar.gz released. This release is slightly more substantial than the previous one. It includes a few more widgets, and CSS changes to make the example programs much nicer-looking.

Fri Aug 23 15:00:51 BST 2002

monolith-0.8.0.tar.gz released. This is the first basic release of the new C/C++-based monolith library. It contains a single simple example program and just a few basic widgets.

<% include page_footer.msp %> endef upload_website: scp $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)-1.*.rpm \ $(PACKAGE)-$(VERSION).bin.tar.gz \ 10.0.0.248:annexia.org/freeware/$(PACKAGE)/ scp index.html \ 10.0.0.248:annexia.org/freeware/$(PACKAGE)/index.msp .PHONY: build configure test upload_website