diff -ur microwindows-0.91/src/config microwindows-0.91/src/config --- microwindows-0.91/src/config Sun Nov 16 23:34:12 2003 +++ microwindows-0.91/src/config Fri Feb 10 19:47:23 2006 @@ -21,15 +21,10 @@ # Valid ARCH values are: # # LINUX-NATIVE -# LINUX-TCC # LINUX-ARM # LINUX-MIPS -# LINUX-POWERPC (BIGENDIAN=Y) -# LINUX-SPARC (BIGENDIAN=Y) -# LINUX-SH -# FREEBSD-X86 -# SOLARIS (BIGENDIAN=Y) -# TRIMEDIA +# LINUX-POWERPC +# SOLARIS # RTEMS # DJGPP # ELKS @@ -37,13 +32,10 @@ # note: ELKS can't build client/server nano-X, nor widget lib # #################################################################### -ARCH = LINUX-NATIVE -BIGENDIAN = N -NATIVETOOLSPREFIX = +ARCH = FREEBSD-X86 ARMTOOLSPREFIX = arm-linux- MIPSTOOLSPREFIX = mipsel-linux- POWERPCTOOLSPREFIX = powerpc-linux- -SHTOOLSPREFIX = sh-linux-gnu RTEMSTOOLSPREFIX = i386-rtemself- #################################################################### @@ -54,8 +46,6 @@ OPTIMIZE = Y DEBUG = N VERBOSE = N -THREADSAFE = Y -GPROF = N #################################################################### # @@ -65,6 +55,7 @@ MICROWIN = Y NANOX = Y SHAREDLIBS = Y +NWIDGET = Y OBJFRAMEWORK = N @@ -91,15 +82,13 @@ # It also enables GdArea/GrArea for this particular pixel packing format. # # define MWPF_PALETTE /* pixel is packed 8 bits 1, 4 or 8 pal index*/ -# define MWPF_TRUECOLOR8888 /* pixel is packed 32 bits 8/8/8/8 truecolor w/alpha*/ # define MWPF_TRUECOLOR0888 /* pixel is packed 32 bits 8/8/8 truecolor*/ # define MWPF_TRUECOLOR888 /* pixel is packed 24 bits 8/8/8 truecolor*/ # define MWPF_TRUECOLOR565 /* pixel is packed 16 bits 5/6/5 truecolor*/ -# define MWPF_TRUECOLOR555 /* pixel is packed 16 bits 5/5/5 truecolor*/ # define MWPF_TRUECOLOR332 /* pixel is packed 8 bits 3/3/2 truecolor*/ # #################################################################### -SCREEN_PIXTYPE = MWPF_TRUECOLOR0888 +SCREEN_PIXTYPE = MWPF_PALETTE #################################################################### # @@ -111,11 +100,6 @@ LINK_APP_INTO_SERVER = N #################################################################### -# Shared memory support for Nano-X client/server protocol speedup -#################################################################### -HAVE_SHAREDMEM_SUPPORT = N - -#################################################################### # # File I/O support # Supporting either below drags in libc stdio, which may not be wanted @@ -129,14 +113,13 @@ HAVE_BMP_SUPPORT = Y HAVE_GIF_SUPPORT = Y HAVE_PNM_SUPPORT = Y -HAVE_XPM_SUPPORT = Y #################################################################### # JPEG support through libjpeg, see README.txt in contrib/jpeg #################################################################### HAVE_JPEG_SUPPORT = Y -INCJPEG = . -LIBJPEG = /usr/lib/libjpeg.so +INCJPEG = /usr/local/include/ +LIBJPEG = /usr/local/lib/libjpeg.a #################################################################### # PNG support via libpng and libz @@ -147,89 +130,36 @@ LIBZ = /usr/lib/libz.a #################################################################### -# TIFF support through libtiff -#################################################################### -HAVE_TIFF_SUPPORT = N -INCTIFF = . -LIBTIFF = /usr/lib/libtiff.a - -#################################################################### -# native .fnt loadable font support -#################################################################### -HAVE_FNT_SUPPORT = Y -HAVE_FNTGZ_SUPPORT = Y -FNT_FONT_DIR = "fonts/bdf" - -#################################################################### # T1 adobe type1 font support thru t1lib #################################################################### HAVE_T1LIB_SUPPORT = N -INCT1LIB = /usr/include +INCT1LIB = /usr/local/include LIBT1LIB = /usr/local/lib/libt1.a #################################################################### -# TrueType font support thru FreeType 1.x -#################################################################### -HAVE_FREETYPE_SUPPORT = Y -INCFTLIB = /usr/include/freetype1 -LIBFTLIB = /usr/lib/libttf.so -FREETYPE_FONT_DIR = "fonts/truetype" - -#################################################################### -# Support for many kinds of font thru FreeType 2.x -# Must also set FREETYPE_FONT_DIR in the Freetype 1.x section +# TrueType font support thru FreeType #################################################################### -HAVE_FREETYPE_2_SUPPORT = N -INCFT2LIB = /usr/include -LIBFT2LIB = /usr/lib/libfreetype.a +HAVE_FREETYPE_SUPPORT = N +INCFTLIB = /usr/local/freetype/include +LIBFTLIB = /usr/local/lib/libttf.so #################################################################### -# PCF font support -# Selecting HAVE_PCFGZ_SUPPORT will allow you to directly read -# .pcf.gz files, but it will add libz to the size of the server +# Shared memory support for Nano-X client/server protocol speedup #################################################################### -HAVE_PCF_SUPPORT = Y -HAVE_PCFGZ_SUPPORT = Y -PCF_FONT_DIR = "fonts/pcf" +HAVE_SHAREDMEM_SUPPORT = Y #################################################################### -# Chinese Han Zi Ku loadable font support +# Chinese Han Zi Ku font support #################################################################### HAVE_HZK_SUPPORT = N HZK_FONT_DIR = "fonts/chinese" #################################################################### -# Chinese BIG5 compiled in font support (big5font.c) -#################################################################### -HAVE_BIG5_SUPPORT = N - -#################################################################### # Chinese GB2312 compiled in font support (gb2312font.c) #################################################################### HAVE_GB2312_SUPPORT = N #################################################################### -# Japanese JISX0213 compiled in font support (jisx0213-12x12.c) -#################################################################### -HAVE_JISX0213_SUPPORT = N - -#################################################################### -# Korean HANGUL font support (jo16x16.c) -#################################################################### -HAVE_KSC5601_SUPPORT = N - -#################################################################### -# Japanese EUC-JP support using loadable MGL font -#################################################################### -HAVE_EUCJP_SUPPORT = N -EUCJP_FONT_DIR = "fonts/japanese" - -#################################################################### -# Generate screen driver interface only with no fonts or clipping -#################################################################### -NOFONTSORCLIPPING = N - -#################################################################### # # Window move algorithms for Microwindows # Change for tradeoff between cpu speed and looks @@ -244,6 +174,13 @@ #################################################################### # +# Use MS fonts (default no) +# +#################################################################### +HAVEMSFONTS = N + +#################################################################### +# # Link with Gray Palette (valid only for 4bpp modes) # #################################################################### @@ -260,30 +197,20 @@ X11 = N ifeq ($(X11), Y) -# startup screen width, height, (depth for palette mode only) +# predefined model or select screen width, height, depth(palette mode only) +SCREEN_E15 = N SCREEN_WIDTH = 640 SCREEN_HEIGHT = 480 SCREEN_DEPTH = 4 -# You may want to turn this on for XFree86 4.x or if your backing store -# isn't functioning properly -USE_EXPOSURE = Y - else # framebuffer screen driver (linear and/or vga 4 planes) # set VTSWITCH to include virtual terminal switch code -# set FBREVERSE to reverse bit orders in 1,2,4 bpp -# set FBVGA=N for all systems without VGA hardware (for MIPS must=N) -FRAMEBUFFER = Y -FBVGA = Y -VTSWITCH = Y -FBREVERSE = N - -# set HAVETEXTMODE=Y for systems that can switch between text & graphics. -# On a graphics-only embedded system, such as Osprey and Embedded -# Planet boards, set HAVETEXTMODE=N -HAVETEXTMODE = Y +FRAMEBUFFER = N +FBVGA = N +VTSWITCH = N +PORTRAIT_MODE = N # svgalib screen driver VGALIB = N @@ -292,64 +219,37 @@ HWVGA = N #################################################################### -# Mouse drivers -# GPMMOUSE gpm mouse -# SERMOUSE serial Microsoft, PC, Logitech, PS/2 mice (/dev/psaux) -# SUNMOUSE Sun Workstation mouse (/dev/sunmouse) -# NOMOUSE no mouse driver -# -# Touchscreen drivers -# IPAQMOUSE Compaq iPAQ, Intel Assabet (/dev/h3600_tsraw) -# ZAURUSMOUSE Sharp Zaurus (/dev/sharp_ts) -# TUXMOUSE TuxScreen (/dev/ucb1x00-ts) -# ADSMOUSE Applied Data Systems GC+ (/dev/ts) -# ADS7846MOUSE ADS7846 chip, PSI OMAP Innovator (/dev/innnovator_ts) -# EPMOUSE Embedded Planet (/dev/tpanel) -# VHMOUSE Vtech Helio (/dev/tpanel) -# MTMOUSE MicroTouch serial (/dev/ttyS1) -# PSIONMOUSE Psion 5 (/dev/touch_psion) -# YOPYMOUSE Yopy (/dev/yopy-ts) -# HARRIERMOUSE NEC Harrier (/dev/tpanel) +# Mouse or touch screen driver +# TPMOUSE for Linux-VR and Embedded Planet +# ADSMOUSE for ADS Graphics Client +# IPAQMOUSE for Compaq iPAQ #################################################################### -GPMMOUSE = Y -SERMOUSE = N +GPMMOUSE = N SUNMOUSE = N -NOMOUSE = N -IPAQMOUSE = N -ZAURUSMOUSE = N -TUXMOUSE = N +SERMOUSE = N +TPMOUSE = N ADSMOUSE = N -ADS7846MOUSE = N -EPMOUSE = N -VHMOUSE = N -MTMOUSE = N -PSIONMOUSE = N -YOPYMOUSE = N -HARRIERMOUSE = N -LIRCMOUSE = N +IPAQMOUSE = N +NOMOUSE = N # keyboard or null kbd driver TTYKBD = N -SCANKBD = Y -PIPEKBD = N -IPAQKBD = N -LIRCKBD = N NOKBD = N endif -# Secondary keyboard drivers. -# You may have a normal keyboard driver in addition to these -# drivers, e.g. for both normal keyboard and IR input. -LIRCKBD2 = N - #################################################################### -# Screen driver specific configuration -# SA1100_LCD_LTLEND 4bpp driver with arm SA1100 LCD controller -# INVERT4BPP 4bpp inverted pixel driver for VTech Helio +# +# If the platform is a LINUX-ARM box .... +# #################################################################### +ifeq ($(ARCH), LINUX-ARM) + +# If 4bpp driver with arm SA1100 LCD controller is used ... SA1100_LCD_LTLEND = N -INVERT4BPP = N + +endif + #################################################################### # diff -ur microwindows-0.91/src/demos/nanox/Makefile microwindows-0.91/src/demos/nanox/Makefile --- microwindows-0.91/src/demos/nanox/Makefile Thu Sep 25 04:15:01 2003 +++ microwindows-0.91/src/demos/nanox/Makefile Fri Feb 10 21:19:14 2006 @@ -26,6 +26,10 @@ LDFLAGS += LIBM = -lm +ifeq ($(ARCH),FREEBSD-X86) +LIBUTIL = -lutil +endif + ############################# targets section ################################ ifeq ($(NANOX), Y) @@ -70,7 +74,6 @@ $(MW_DIR_BIN)/nsaver \ $(MW_DIR_BIN)/nxcal \ $(MW_DIR_BIN)/grabdemo - ifneq ($(ARCH),CYGWIN) TARGETS += \ $(MW_DIR_BIN)/nxterm @@ -139,6 +142,12 @@ $(MW_DIR_BIN)/grabdemo \ $(MW_DIR_BIN)/nsaver +ifeq ($(ARCH),FREEBSD-X86) +# These demos need -lutil +NANOX_DEMOS_WITH_LIBUTIL_LINK := \ + $(MW_DIR_BIN)/nxterm +endif + # These demos use a hardcoded link line. NANOX_DEMOS_WITH_NONSTANDARD_LINK := \ $(NANOX_DEMOS_WITH_LIBM_LINK) \ @@ -160,6 +169,13 @@ @echo "Linking $(patsubst $(MW_DIR_BIN)/%,%,$@) ..." $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS) $(LIBM) +ifeq ($(ARCH), FREEBSD-X86) +# Link rule used for demos with libutil. +$(NANOX_DEMOS_WITH_LIBUTIL_LINK): $(MW_DIR_BIN)/%: $(MW_DIR_OBJ)/demos/nanox/%.o $(NANOXCLIENTLIBS) $(CONFIG) + @echo "Linking $(patsubst $(MW_DIR_BIN)/%,%,$@) ..." + $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS) $(LIBUTIL) +endif + $(MW_DIR_BIN)/snap_jpg: $(MW_DIR_OBJ)/demos/nanox/snap_jpg.o $(NANOXCLIENTLIBS) $(CONFIG) @echo "Linking $(patsubst $(MW_DIR_BIN)/%,%,$@) ..." $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@ $(LD_NANOXCLIENTLIBS) $(LIBJPEG) diff -ur microwindows-0.91/src/demos/nxscribble/li_recognizer.c microwindows-0.91/src/demos/nxscribble/li_recognizer.c --- microwindows-0.91/src/demos/nxscribble/li_recognizer.c Sun Nov 16 23:34:12 2003 +++ microwindows-0.91/src/demos/nxscribble/li_recognizer.c Fri Feb 10 20:27:39 2006 @@ -938,7 +938,7 @@ ************************************************** */ /*#include */ -#if defined(__ECOS) || defined(__CYGWIN__) +#if defined(__ECOS) || defined(__CYGWIN__) || defined (__FreeBSD__) #define MAXINT 0x7FFFFFFF #else #include diff -ur microwindows-0.91/src/demos/tuxchess/Makefile microwindows-0.91/src/demos/tuxchess/Makefile --- microwindows-0.91/src/demos/tuxchess/Makefile Thu Sep 25 04:15:01 2003 +++ microwindows-0.91/src/demos/tuxchess/Makefile Fri Feb 10 20:44:09 2006 @@ -58,13 +58,19 @@ ######################## Tools targets section ############################### +ifeq ($(ARCH), FREEBSD-X86) +LCOMPAT= -lcompat +else +LCOMPAT = +endif + ifeq ($(SHAREDLIBS), Y) $(MW_DIR_BIN)/tuxchess: $(OBJS) $(NANOXCLIENTLIBS) $(CONFIG) @echo "Linking $(patsubst $(MW_DIR_BIN)/%,%,$@) ..." - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(CCNANOXCLIENTLIBS) + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(CCNANOXCLIENTLIBS) $(LCOMPAT) else $(MW_DIR_BIN)/tuxchess: $(OBJS) $(NANOXCLIENTLIBS) $(CONFIG) @echo "Linking $(patsubst $(MW_DIR_BIN)/%,%,$@) ..." - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(NANOXCLIENTLIBS) + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(NANOXCLIENTLIBS) $(LCOMPAT) endif diff -ur microwindows-0.91/src/demos/tuxchess/main.c microwindows-0.91/src/demos/tuxchess/main.c --- microwindows-0.91/src/demos/tuxchess/main.c Tue May 6 08:18:38 2003 +++ microwindows-0.91/src/demos/tuxchess/main.c Fri Feb 10 20:34:07 2006 @@ -7,6 +7,9 @@ #include #include #include +#if defined(__FreeBSD__) +#include +#endif #include #include "defs.h" #include "data.h" diff -ur microwindows-0.91/src/drivers/fb.c microwindows-0.91/src/drivers/fb.c --- microwindows-0.91/src/drivers/fb.c Fri Apr 11 08:32:06 2003 +++ microwindows-0.91/src/drivers/fb.c Fri Feb 10 19:59:11 2006 @@ -29,7 +29,9 @@ extern SUBDRIVER fblinear16; extern SUBDRIVER fblinear24; extern SUBDRIVER fblinear32; +#if !defined(__FreeBSD__) extern SUBDRIVER fblinear32alpha; +#endif #if FBVGA extern SUBDRIVER vgaplan4; extern SUBDRIVER memplan4; @@ -66,8 +68,10 @@ break; case 32: if (psd->pixtype == MWPF_TRUECOLOR8888) { +#if ! defined (__FreeBSD__) driver = &fblinear32alpha; } else { +#endif driver = &fblinear32; } break; diff -ur microwindows-0.91/src/drivers/mou_fbsd.c microwindows-0.91/src/drivers/mou_fbsd.c --- microwindows-0.91/src/drivers/mou_fbsd.c Thu Jun 21 08:32:41 2001 +++ microwindows-0.91/src/drivers/mou_fbsd.c Fri Feb 10 19:49:14 2006 @@ -5,8 +5,7 @@ #include #include -#include -#include +#include /* #include */ diff -ur microwindows-0.91/src/drivers/scr_fbsd.c microwindows-0.91/src/drivers/scr_fbsd.c --- microwindows-0.91/src/drivers/scr_fbsd.c Thu Jun 21 08:32:41 2001 +++ microwindows-0.91/src/drivers/scr_fbsd.c Fri Feb 10 19:48:40 2006 @@ -8,7 +8,9 @@ */ #include -#include +#include +#include +#include #include #include #include diff -ur microwindows-0.91/src/include/swap.h microwindows-0.91/src/include/swap.h --- microwindows-0.91/src/include/swap.h Sat Feb 28 18:07:36 2004 +++ microwindows-0.91/src/include/swap.h Fri Feb 10 19:46:46 2006 @@ -76,24 +76,6 @@ #elif defined(__FreeBSD__) # include -# if __BYTE_ORDER == __BIG_ENDIAN -# if !MW_CPU_BIG_ENDIAN -# error MW_CPU_BIG_ENDIAN and your OS disagree about your CPUs byte-order. Did you forget to set BIGENDIAN in the config file? -# endif -# ifndef __byte_swap_word -/* Either this isn't GCC or the implementation changed. */ -# warning __byte_swap_word not defined in endian.h on FreeBSD. -# else -# undef wswap -# undef dwswap -# define wswap(x) __byte_swap_word(x) -# define dwswap(x) __byte_swap_long(x) -# endif /* ifndef __byte_swap_word*/ -# else -# if MW_CPU_BIG_ENDIAN -# error MW_CPU_BIG_ENDIAN and your OS disagree about your CPUs byte-order. Did you accidentally set BIGENDIAN in the config file? -# endif -# endif /* !__BYTE_ORDER == __BIG_ENDIAN*/ /* ********************************************************************* */ /* ECOS */ Only in microwindows-0.91/src/lib: -lcompat diff -ur microwindows-0.91/src/mwin/winlib/caret.c microwindows-0.91/src/mwin/winlib/caret.c --- microwindows-0.91/src/mwin/winlib/caret.c Thu Nov 15 23:49:26 2001 +++ microwindows-0.91/src/mwin/winlib/caret.c Fri Feb 10 19:57:13 2006 @@ -8,7 +8,7 @@ #include #include #include -#ifndef __ECOS +#if ! (defined (__FreeBSD__) || defined (__ECOS)) #include #endif #include "windows.h"