Skip to contentSkip to conversation

Microwindows 0.87 ELKS build patch

PATCH New Jody Bruchon 1 participant 1 message Mar 8, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Microwindows 0.87 ELKS build patch

** Note: this is a build patch only; the software is still broken **

Microwindows is a windowing system that used to build and work on ELKS:

https://en.wikipedia.org/wiki/Microwindows
http://microwindows.org/

The documentation in the most "recent" versions (Microwindows hasn't seen a release since 2011) indicates that all of the ELKS support has been untested since version 0.86, and some of the ELKS-specific configuration options have been hidden or removed.

The latest snapshot fails to build for ELKS and is basically useless to us. However, since 0.86 was the last version indicated in the documentation to be tested against ELKS, I decided to grab 0.87 and see if it could still be done.

This patch will convert a stock Microwindows 0.87 source tree to build with ELKS and changes default options to be geared towards ELKS. You must invoke 'make' with an ELKSDIR variable which points to your ELKS repository source code directory (NOT to the kernel source, but to the directory containing it!)

Get Microwindows 0.87 at:

ftp://microwindows.censoft.com/pub/microwindows/Historic/microwindows-0.87.tar.gz

Basic directions:

tar -xzf microwindows-0.87.tar.gz
cd microwin
patch -p1 < ../0001-microwin-087-elks-build.patch
cd src
make ELKSDIR=/path/to/elks/repo

The demo/test binaries will be in "microwin/src/bin". In my testing, these binaries do NOT currently work under ELKS, but they compile and most of them execute when copied to a "full3" image. If someone wants to try it out and figure out how to make it actually work, go for it!

-Jody Bruchon

src/Arch.rules +2 -2
diff -Naur microwin/src/Arch.rules microwin-0.87/src/Arch.rules
@@ -50,10 +50,10 @@
 HOSTCC = gcc
 CXX_COMPILER =
 TOOLSPREFIX =
-INCLUDEDIRS += -I/usr/bcc/include -I/home/greg/net/elks/include
+INCLUDEDIRS += -I/usr/lib/bcc/include -I/usr/bcc/include -I$(ELKSDIR)/elks/include
 DEFINES += -DELKS=1 -DUNIX=1 -Dconst= -Dvolatile=
 CFLAGS += -0 -ansi -O
-LDFLAGS +=
+LDFLAGS += -s
 endif
 
 ifeq ($(ARCH), DJGPP)
src/Makefile.rules +2 -2
diff -Naur microwin/src/Makefile.rules microwin-0.87/src/Makefile.rules
@@ -125,7 +125,7 @@
 #
 .depend: $(OBJS:.o=.c) $(CXXOBJS:.o=.cc)
 	@echo "Updating dependencies in $(CURDIR) ..."
-	$(SHELL) -ec '$(HOSTCC) -MM $(CPPFLAGS) $(CFLAGS) $(OBJS:.o=.c) \
+	$(SHELL) -ec '$(HOSTCC) -MM $(CPPFLAGS) $(HOSTCFLAGS) $(OBJS:.o=.c) \
 	| sed '\''s/\($*\)\.o[ :]*/\1.o \$@ : $$(TOP)\/config /g'\'' > $@; \
 	[ -s $@ ] || rm -f $@'
 
@@ -150,7 +150,7 @@
 
 clean:
 	@echo "Cleaning directory $(CURDIR) ..."
-	$(RM) core *~ *.bak *.o TAGS
+	$(RM) core *~ *.bak *.o TAGS .depend
 	$(RM) $(TOP)/lib/*.a
 	$(shell cd $(TOP)/bin; \
 		for file in `\ls`; do if [ ! -d $$file ]; \
src/config +5 -5
diff -Naur microwin/src/config microwin-0.87/src/config
@@ -31,7 +31,7 @@
 # note: ELKS can't build client/server nano-X, nor widget lib
 #
 ####################################################################
-ARCH                     = LINUX-NATIVE
+ARCH                     = ELKS
 ARMTOOLSPREFIX           = arm-linux-
 MIPSTOOLSPREFIX          = mipsel-linux-
 RTEMSTOOLSPREFIX         = i386-rtemself-
@@ -43,7 +43,7 @@
 ####################################################################
 OPTIMIZE                 = Y
 DEBUG                    = N
-VERBOSE                  = N
+VERBOSE                  = Y
 
 ####################################################################
 #
@@ -51,7 +51,7 @@
 #
 ####################################################################
 MICROWIN                 = Y
-NANOX                    = Y
+NANOX                    = N
 NWIDGET                  = N
 OBJFRAMEWORK             = N
 
@@ -62,7 +62,7 @@
 #
 ####################################################################
 MICROWINDEMO             = Y
-NANOXDEMO                = Y
+NANOXDEMO                = N
 
 ####################################################################
 #
@@ -119,7 +119,7 @@
 # UPDATEREGIONS paints in update clipping region only for better look and feel
 #
 ####################################################################
-ERASEMOVE                = Y
+ERASEMOVE                = N
 UPDATEREGIONS            = N
 
 ####################################################################