Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cross compiling Dual-Core Cortex-A7 ARM #103

Open
big-vl opened this issue Feb 12, 2025 · 7 comments
Open

cross compiling Dual-Core Cortex-A7 ARM #103

big-vl opened this issue Feb 12, 2025 · 7 comments

Comments

@big-vl
Copy link

big-vl commented Feb 12, 2025

Now it’s hard for me to figure out the configuration because I am confused by the link to ARM from the official site, maybe someone has a minimum example of configuration for ARM and Framebuffer display

@big-vl big-vl changed the title cross compiling arm cortex Dual-Core Cortex-A7 ARM cross compiling Dual-Core Cortex-A7 ARM Feb 12, 2025
@ghaerr
Copy link
Owner

ghaerr commented Feb 12, 2025

Where is the link to ARM you are referring to?

You will need to spend some time reading the README to learn what is needed in the config file to build something for your system. There are a number of prebuilt configurations in Configs/. Your description gives not much information for anyone to help you; a sample Linux framebuffer configuration is in Configs/linux-fb.

@big-vl
Copy link
Author

big-vl commented Feb 12, 2025

I indicate well in the configuration, but he stubbornly tries to compile through the usual GCC, while I deal with this moment

ARCH = LINUX-NATIVE
TOOLSPREFIX = arm-linux-gnueabihf-

Here is a link
http://microwindows.org/pub/other/ads/config.arm

Where is the link to ARM you are referring to?

You will need to spend some time reading the README to learn what is needed in the config file to build something for your system. There are a number of prebuilt configurations in Configs/. Your description gives not much information for anyone to help you; a sample Linux framebuffer configuration is in Configs/linux-fb.

@big-vl
Copy link
Author

big-vl commented Feb 12, 2025

gcc				 -MM -I/www/FF5/gui/microwindows/src/include -I/usr/local/include/freetype2 -DHAVE_FILEIO=1 -DHAVE_PNG_SUPPORT=1 -DHAVE_BMP_SUPPORT=1 -DHAVE_GIF_SUPPORT=1 -DHAVE_PNM_SUPPORT=1 -DHAVE_XPM_SUPPORT=1 -DHAVE_FNT_SUPPORT=1 -DFNT_FONT_DIR="\""fonts/fnt""\" -DHAVE_FNTGZ_SUPPORT=1 -DHAVE_PCF_SUPPORT=1 -DPCF_FONT_DIR="\""fonts/pcf""\" -DHAVE_PCFGZ_SUPPORT=1 -DHAVE_FREETYPE_2_SUPPORT=1 -DFREETYPE_FONT_DIR=\""fonts/truetype"\" -DTHREADSAFE=1 -DMWPIXEL_FORMAT=MWPF_TRUECOLORRGB -DSCREEN_PIXTYPE=MWPF_TRUECOLORRGB -DSCREEN_HEIGHT=768 -DSCREEN_WIDTH=1024 -DSCREEN_DEPTH=16 -DDEBUG=1 -DLINUX=1 -DUNIX=1 /www/FF5/gui/microwindows/src/demos/nxscribble/li_recognizer.c | sed 's/.*\.o[ :]*/\/www\/SVO\/FF5\/gui\/microwindows\/src\/obj\/demos\/nxscribble\/li_recognizer.o : /g' > /www/FF5/gui/microwindows/src/obj/demos/nxscribble/li_recognizer.d || (rm /www/FF5/gui/microwindows/src/obj/demos/nxscribble/li_recognizer.o /www/FF5/gui/microwindows/src/obj/demos/nxscribble/li_recognizer.d ; exit 1)
Compiling demos/nxscribble/bitvector.c ...
gcc				 -c -fpic -O3 -g -Wunused-variable -Wmissing-prototypes -Wall -Wpointer-arith -Wbad-function-cast -I/www/FF5/gui/microwindows/src/include -I/usr/local/include/freetype2 -DHAVE_FILEIO=1 -DHAVE_PNG_SUPPORT=1 -DHAVE_BMP_SUPPORT=1 -DHAVE_GIF_SUPPORT=1 -DHAVE_PNM_SUPPORT=1 -DHAVE_XPM_SUPPORT=1 -DHAVE_FNT_SUPPORT=1 -DFNT_FONT_DIR="\""fonts/fnt""\" -DHAVE_FNTGZ_SUPPORT=1 -DHAVE_PCF_SUPPORT=1 -DPCF_FONT_DIR="\""fonts/pcf""\" -DHAVE_PCFGZ_SUPPORT=1 -DHAVE_FREETYPE_2_SUPPORT=1 -DFREETYPE_FONT_DIR=\""fonts/truetype"\" -DTHREADSAFE=1 -DMWPIXEL_FORMAT=MWPF_TRUECOLORRGB -DSCREEN_PIXTYPE=MWPF_TRUECOLORRGB -DSCREEN_HEIGHT=768 -DSCREEN_WIDTH=1024 -DSCREEN_DEPTH=16 -DDEBUG=1 -DLINUX=1 -DUNIX=1 -I/usr/local/include/freetype2 -I/usr/include/freetype2 -Wall -Wno-missing-prototypes -Wno-missing-prototypes				 -o /www/FF5/gui/microwindows/src/obj/demos/nxscribble/bitvector.o /www/FF5/gui/microwindows/src/demos/nxscribble/bitvector.c
/www/FF5/gui/microwindows/src/demos/nxscribble/bitvector.c: In function ‘BitVectorToString’:
/www/FF5/gui/microwindows/src/demos/nxscribble/bitvector.c:37:1: error: type of ‘max’ defaults to ‘int’ [-Wimplicit-int]
   37 | BitVectorToString(max, bv)

The problem of compilation and types, but only I still do not understand why GCC uses instead of ARM compiler arm-linux-gnueabi-gcc

@rofl0r
Copy link
Collaborator

rofl0r commented Feb 12, 2025

if the makefiles are properly written, it should be sufficient to run make CC=arm-linux-gnueabi-gcc

@big-vl
Copy link
Author

big-vl commented Feb 12, 2025

if the makefiles are properly written, it should be sufficient to run make CC=arm-linux-gnueabi-gcc

For my platform there is a tulchain that can collect under my Linux 5.4.284, but there are toolchain problems with Libz and PNG

Linking nano-X ...
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc				 -fpic -O3 -g -mstructure-size-boundary=8 -L/opt/tslib-1.12/lib/ -I/Volumes/.build/src/zlib-1.2.13/ -lm -o /Volumes/microwindows/src/bin/nano-X /Volumes/microwindows/src/obj/engine/devopen.o /Volumes/microwindows/src/obj/engine/devdraw.o /Volumes/microwindows/src/obj/engine/devblit.o /Volumes/microwindows/src/obj/engine/convblit_8888.o /Volumes/microwindows/src/obj/engine/convblit_mask.o /Volumes/microwindows/src/obj/engine/convblit_frameb.o /Volumes/microwindows/src/obj/engine/devfont.o /Volumes/microwindows/src/obj/engine/devmouse.o /Volumes/microwindows/src/obj/engine/devkbd.o /Volumes/microwindows/src/obj/engine/devclip.o  /Volumes/microwindows/src/obj/engine/devrgn.o /Volumes/microwindows/src/obj/engine/devtimer.o /Volumes/microwindows/src/obj/engine/devpal1.o /Volumes/microwindows/src/obj/engine/devpal2.o /Volumes/microwindows/src/obj/engine/devimage.o /Volumes/microwindows/src/obj/engine/devimage_stretch.o /Volumes/microwindows/src/obj/engine/image_bmp.o /Volumes/microwindows/src/obj/engine/image_gif.o /Volumes/microwindows/src/obj/engine/image_jpeg.o /Volumes/microwindows/src/obj/engine/image_png.o /Volumes/microwindows/src/obj/engine/image_pnm.o /Volumes/microwindows/src/obj/engine/image_tiff.o /Volumes/microwindows/src/obj/engine/image_xpm.o /Volumes/microwindows/src/obj/engine/devlist.o /Volumes/microwindows/src/obj/engine/selfont.o /Volumes/microwindows/src/obj/engine/devrgn2.o /Volumes/microwindows/src/obj/engine/devarc.o /Volumes/microwindows/src/obj/engine/devpoly.o /Volumes/microwindows/src/obj/engine/devstipple.o /Volumes/microwindows/src/obj/engine/font_dbcs.o /Volumes/microwindows/src/obj/engine/font_fnt.o /Volumes/microwindows/src/obj/engine/devpal8.o /Volumes/microwindows/src/obj/engine/devpal4.o /Volumes/microwindows/src/obj/fonts/compiled/rom8x16.o /Volumes/microwindows/src/obj/fonts/compiled/rom8x8.o /Volumes/microwindows/src/obj/fonts/compiled/winFreeSansSerif11x13.o /Volumes/microwindows/src/obj/fonts/compiled/winFreeSystem14x16.o /Volumes/microwindows/src/obj/fonts/compiled/X6x13.o /Volumes/microwindows/src/obj/drivers/fblin8.o /Volumes/microwindows/src/obj/drivers/fblin16.o /Volumes/microwindows/src/obj/drivers/fblin24.o /Volumes/microwindows/src/obj/drivers/fblin32.o /Volumes/microwindows/src/obj/drivers/fb.o /Volumes/microwindows/src/obj/drivers/fbportrait_left.o /Volumes/microwindows/src/obj/drivers/fbportrait_right.o /Volumes/microwindows/src/obj/drivers/fbportrait_down.o /Volumes/microwindows/src/obj/drivers/fblin1.o /Volumes/microwindows/src/obj/drivers/fblin2.o /Volumes/microwindows/src/obj/drivers/fblin4.o /Volumes/microwindows/src/obj/drivers/rasterops.o /Volumes/microwindows/src/obj/drivers/genmem.o /Volumes/microwindows/src/obj/drivers/genfont.o /Volumes/microwindows/src/obj/drivers/osdep.o /Volumes/microwindows/src/obj/drivers/scr_fb.o /Volumes/microwindows/src/obj/drivers/mou_null.o /Volumes/microwindows/src/obj/drivers/kbd_null.o /Volumes/microwindows/src/obj/nanox/srvmain.o /Volumes/microwindows/src/obj/nanox/srvfunc.o /Volumes/microwindows/src/obj/nanox/srvutil.o /Volumes/microwindows/src/obj/nanox/srvevent.o /Volumes/microwindows/src/obj/nanox/srvclip.o /Volumes/microwindows/src/obj/nanox/nxdraw.o /Volumes/microwindows/src/obj/nanox/nxutil.o /Volumes/microwindows/src/obj/nanox/nxtransform.o /Volumes/microwindows/src/obj/nanox/wmaction.o /Volumes/microwindows/src/obj/nanox/wmclients.o /Volumes/microwindows/src/obj/nanox/wmevents.o /Volumes/microwindows/src/obj/nanox/wmutil.o /Volumes/microwindows/src/obj/nanox/srvnet.o -L/opt/tslib-1.12/lib/ -I/Volumes/.build/src/zlib-1.2.13/ -L/opt/tslib-1.12/lib/ -I/Volumes/.build/src/zlib-1.2.13/ -lm 
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/obj/engine/font_fnt.o: in function `fnt_load_font':
/Volumes/microwindows/src/engine/font_fnt.c:260: undefined reference to `gzopen'
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/obj/engine/font_fnt.o: in function `READSTR':
/Volumes/microwindows/src/engine/font_fnt.c:224: undefined reference to `gzread'
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/obj/engine/font_fnt.o: in function `fnt_load_font':
/Volumes/microwindows/src/engine/font_fnt.c:357: undefined reference to `gzclose'
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/obj/engine/font_fnt.o: in function `READSTRPAD':
/Volumes/microwindows/src/engine/font_fnt.c:234: undefined reference to `gzread'
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/engine/font_fnt.c:234: undefined reference to `gzread'
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/obj/engine/font_fnt.o: in function `READSHORT':
/Volumes/microwindows/src/engine/font_fnt.c:174: undefined reference to `gzread'
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/engine/font_fnt.c:174: undefined reference to `gzread'
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/obj/engine/font_fnt.o: in function `fnt_load_font':
/Volumes/microwindows/src/engine/font_fnt.c:357: undefined reference to `gzclose'
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/obj/engine/font_fnt.o: in function `READSHORT':
/Volumes/microwindows/src/engine/font_fnt.c:174: undefined reference to `gzread'
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/engine/font_fnt.c:174: undefined reference to `gzread'
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/obj/engine/font_fnt.o: in function `READLONG':
/Volumes/microwindows/src/engine/font_fnt.c:197: undefined reference to `gzread'
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/engine/font_fnt.c:197: undefined reference to `gzread'
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/engine/font_fnt.c:197: undefined reference to `gzread'
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/obj/engine/font_fnt.o:/Volumes/microwindows/src/engine/font_fnt.c:197: more undefined references to `gzread' follow
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/obj/engine/font_fnt.o: in function `fnt_load_font':
/Volumes/microwindows/src/engine/font_fnt.c:353: undefined reference to `gzclose'
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: /Volumes/microwindows/src/obj/engine/font_fnt.o: in function `READSHORT':
/Volumes/microwindows/src/engine/font_fnt.c:174: undefined reference to `gzread'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:97: /Volumes/microwindows/src/bin/nano-X] Error 1
make[1]: Leaving directory '/Volumes/microwindows/src/nanox'

# Configure and build cross-tools 
ct-ng arm-unknown-linux-gnueabi

# Configure
# - glibc version to 2.25
# - Linux Kernel version 5.4.289
ct-ng menuconfig

# Build
ct-ng build -j$(nproc)

change Arch.rules

ARMTOOLSPREFIX = /Volumes/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-

I do not describe how I collected it, what ways and what changes because it is already clear that it is going to my needs, but so far the problem is with the three libraries

Linking nano-X ...
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc				 -fpic -O3 -g -mstructure-size-boundary=8 -L/opt/tslib-1.12/lib/ -lz -lm -o /Volumes/microwindows/src/bin/nano-X /Volumes/microwindows/src/obj/engine/devopen.o /Volumes/microwindows/src/obj/engine/devdraw.o /Volumes/microwindows/src/obj/engine/devblit.o /Volumes/microwindows/src/obj/engine/convblit_8888.o /Volumes/microwindows/src/obj/engine/convblit_mask.o /Volumes/microwindows/src/obj/engine/convblit_frameb.o /Volumes/microwindows/src/obj/engine/devfont.o /Volumes/microwindows/src/obj/engine/devmouse.o /Volumes/microwindows/src/obj/engine/devkbd.o /Volumes/microwindows/src/obj/engine/devclip.o  /Volumes/microwindows/src/obj/engine/devrgn.o /Volumes/microwindows/src/obj/engine/devtimer.o /Volumes/microwindows/src/obj/engine/devpal1.o /Volumes/microwindows/src/obj/engine/devpal2.o /Volumes/microwindows/src/obj/engine/devimage.o /Volumes/microwindows/src/obj/engine/devimage_stretch.o /Volumes/microwindows/src/obj/engine/image_bmp.o /Volumes/microwindows/src/obj/engine/image_gif.o /Volumes/microwindows/src/obj/engine/image_jpeg.o /Volumes/microwindows/src/obj/engine/image_png.o /Volumes/microwindows/src/obj/engine/image_pnm.o /Volumes/microwindows/src/obj/engine/image_tiff.o /Volumes/microwindows/src/obj/engine/image_xpm.o /Volumes/microwindows/src/obj/engine/devlist.o /Volumes/microwindows/src/obj/engine/selfont.o /Volumes/microwindows/src/obj/engine/devrgn2.o /Volumes/microwindows/src/obj/engine/devarc.o /Volumes/microwindows/src/obj/engine/devpoly.o /Volumes/microwindows/src/obj/engine/devstipple.o /Volumes/microwindows/src/obj/engine/font_dbcs.o /Volumes/microwindows/src/obj/engine/font_fnt.o /Volumes/microwindows/src/obj/engine/devpal8.o /Volumes/microwindows/src/obj/engine/devpal4.o /Volumes/microwindows/src/obj/fonts/compiled/rom8x16.o /Volumes/microwindows/src/obj/fonts/compiled/rom8x8.o /Volumes/microwindows/src/obj/fonts/compiled/winFreeSansSerif11x13.o /Volumes/microwindows/src/obj/fonts/compiled/winFreeSystem14x16.o /Volumes/microwindows/src/obj/fonts/compiled/X6x13.o /Volumes/microwindows/src/obj/drivers/fblin8.o /Volumes/microwindows/src/obj/drivers/fblin16.o /Volumes/microwindows/src/obj/drivers/fblin24.o /Volumes/microwindows/src/obj/drivers/fblin32.o /Volumes/microwindows/src/obj/drivers/fb.o /Volumes/microwindows/src/obj/drivers/fbportrait_left.o /Volumes/microwindows/src/obj/drivers/fbportrait_right.o /Volumes/microwindows/src/obj/drivers/fbportrait_down.o /Volumes/microwindows/src/obj/drivers/fblin1.o /Volumes/microwindows/src/obj/drivers/fblin2.o /Volumes/microwindows/src/obj/drivers/fblin4.o /Volumes/microwindows/src/obj/drivers/rasterops.o /Volumes/microwindows/src/obj/drivers/genmem.o /Volumes/microwindows/src/obj/drivers/genfont.o /Volumes/microwindows/src/obj/drivers/osdep.o /Volumes/microwindows/src/obj/drivers/scr_fb.o /Volumes/microwindows/src/obj/drivers/mou_null.o /Volumes/microwindows/src/obj/drivers/kbd_null.o /Volumes/microwindows/src/obj/nanox/srvmain.o /Volumes/microwindows/src/obj/nanox/srvfunc.o /Volumes/microwindows/src/obj/nanox/srvutil.o /Volumes/microwindows/src/obj/nanox/srvevent.o /Volumes/microwindows/src/obj/nanox/srvclip.o /Volumes/microwindows/src/obj/nanox/nxdraw.o /Volumes/microwindows/src/obj/nanox/nxutil.o /Volumes/microwindows/src/obj/nanox/nxtransform.o /Volumes/microwindows/src/obj/nanox/wmaction.o /Volumes/microwindows/src/obj/nanox/wmclients.o /Volumes/microwindows/src/obj/nanox/wmevents.o /Volumes/microwindows/src/obj/nanox/wmutil.o /Volumes/microwindows/src/obj/nanox/srvnet.o -L/opt/tslib-1.12/lib/ -lz -L/opt/tslib-1.12/lib/ -lz -lm 
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: cannot find -lz: No such file or directory
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: cannot find -lz: No such file or directory
/Volumes/x-tools/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/13.2.0/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd: cannot find -lz: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:97: /Volumes/microwindows/src/bin/nano-X] Error 1
make[1]: Leaving directory '/Volumes/microwindows/src/nanox'
make: *** [/Volumes/microwindows/src/Makefile.rules:463: subdir-/Volumes/microwindows/src/nanox] Error 2

It would be great if you helped me

@big-vl
Copy link
Author

big-vl commented Feb 12, 2025

####################################################################
# config - Microwindows and Nano-X configuration file
#
# Set target architecture using ARCH= from options in Arch.rules
# Set SCREEN/MOUSE/KEYBOARD drivers (typically X11 or FB)
# Set various libraries to build or include and their locations
#
# See the src/Configs directory for pre-built config files.
# Edit this or copy one from src/Configs, and type "make clean; make"
####################################################################

####################################################################
#
# Target platform and compilation options
#
####################################################################
ARCH                     = LINUX-ARM
#NATIVETOOLSPREFIX = gnueabi
#COMPILER = gcc
#TOOLSPREFIX           = arm-linux-gnueabihf-
SHAREDLIBS               = Y
SHAREDLINK               = Y
EXTRAFLAGS               = -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/Volumes/.build/src/zlib-1.2.13/ -Wall -Wno-missing-prototypes
DEBUG                    = Y
OPTIMIZE                 = Y
#OPTIMIZE                 = -O1
VERBOSE                  = Y
THREADSAFE               = Y
PARALLEL                 = N

####################################################################
# Screen Driver
# Set SCREEN=X11 for X11, SCREEN=FB for framebuffer drawing
# Screen size/depth for X11, FBE and non-dynamic framebuffer systems
####################################################################
EXTENGINELIBS            += -L/opt/tslib-1.12/lib/
#-lts -lpng -lpng16 -lz
#SDL_ZOOM                 = 1.0	# must divide screen w/h also when not 1.0
SCREEN_WIDTH             = 1024
SCREEN_HEIGHT            = 768
#X11HDRLOCATION           = $(MW_DIR_SRC)/nx11/X11-local

####################################################################
#
# Libraries to build: microwin, nano-X, nxlib, engine
#
####################################################################
MICROWIN                 = N
NANOX                    = Y
NUKLEARUI                = Y
NX11                     = N
ENGINE                   = N
TINYWIDGETS              = N

####################################################################
#
# Applications and demos to build
#
####################################################################
FBEMULATOR               = N
MICROWINDEMO             = N
MICROWINMULTIAPP         = N
NANOXDEMO                = N
HAVE_VNCSERVER_SUPPORT   = N
VNCSERVER_PTHREADED      = N
LIBVNC                   = 
INCVNC                   =

####################################################################
# LINK_APP_INTO_SERVER links the nano-X server into the application,
# by building a libnano-X.{a,so} that runs standalone.
# Required if UNIX sockets aren't available, for debugging,
# and also used to support running X11 apps through NXLIB on X11.
# NANOWM links the window manager into the server.
####################################################################
LINK_APP_INTO_SERVER     = N
NANOWM                   = Y

####################################################################
# 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
####################################################################
HAVE_FILEIO              = Y

####################################################################
# BMP, GIF reading support
####################################################################
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        = N
INCJPEG                  =
LIBJPEG                  = -ljpeg

####################################################################
# PNG support via libpng and libz
####################################################################
HAVE_PNG_SUPPORT         = N
INCPNG                   =
LIBPNG                   = -lpng
INCZ                     =
LIBZ                     = -lz

####################################################################
# TIFF support through libtiff
####################################################################
HAVE_TIFF_SUPPORT        = N
INCTIFF                  =
LIBTIFF                  = -ltiff

####################################################################
# PCF font support - .pcf/.pcf.gz loadable fonts
####################################################################
HAVE_PCF_SUPPORT         = N
HAVE_PCFGZ_SUPPORT       = N
PCF_FONT_DIR             = "fonts/pcf"

####################################################################
# Truetype fonts - .ttf and .otf loadable fonts thru Freetype 2.x
####################################################################
HAVE_FREETYPE_2_SUPPORT  = N
HAVE_HARFBUZZ_SUPPORT    = N
INCFT2LIB                = /usr/local/include
LIBFT2LIB                = -lfreetype -lbz2
#LIBFT2LIB                += -lharfbuzz
FREETYPE_FONT_DIR        = "fonts/truetype"

####################################################################
# T1 adobe type1 fonts - .pfb/.afm loadable thru t1lib
# t1lib.config must be setup and in T1LIB_FONT_DIR
####################################################################
HAVE_T1LIB_SUPPORT       = N
T1LIB_FONT_DIR           = "fonts/type1"
INCT1LIB                 =
LIBT1LIB                 = -lt1

####################################################################
# FNT font support - .fnt/.fnt.gz loadable fonts (native bdf-converted)
####################################################################
HAVE_FNT_SUPPORT         = Y
HAVE_FNTGZ_SUPPORT       = Y
FNT_FONT_DIR             = "fonts/fnt"

####################################################################
# Specialized font support
#
# Chinese Han Zi Ku HZK loadable font support
# Chinese Hanzi Bitmap Font HBF loadable font support
# DBCS Chinese BIG5 compiled in font support (big5font.c)
# DBCS Chinese GB2312 compiled in font support (gb2312font.c)
# DBCS Japanese JISX0213 compiled in font support (jisx0213-12x12.c)
# Japanese EUC-JP support using loadable MGL font
# DBCS Korean HANGUL font support (jo16x16.c)
# Fribidi and shape/joining support for right to left rendering
####################################################################
HAVE_HZK_SUPPORT         = N
HZK_FONT_DIR             = "fonts/chinese"
HAVE_HBF_SUPPORT         = N
HAVE_BIG5_SUPPORT        = N
HAVE_GB2312_SUPPORT      = N
HAVE_JISX0213_SUPPORT    = N
HAVE_EUCJP_SUPPORT       = N
EUCJP_FONT_DIR           = "fonts/japanese"
HAVE_KSC5601_SUPPORT     = N
HAVE_FRIBIDI_SUPPORT     = N
HAVE_SHAPEJOINING_SUPPORT = N
INCFRIBIDI               =
LIBFRIBIDI               = -lfribidi

####################################################################
# Misc Options
####################################################################

# Window move algorithms for Microwindows
# Change for tradeoff between cpu speed and looks
# ERASEMOVE (nanowm) repaints only backgrounds while window dragging
# Otherwise an XOR redraw is used for window moves only after button up
# UPDATEREGIONS (win32 api only)paints in update clipping region only
ERASEMOVE                = Y
UPDATEREGIONS            = Y

# Generate screen driver interface only with no fonts or clipping
NOFONTS                  = N
NOCLIPPING               = N

# set USE_EXPOSURE for X11 on XFree86 4.x or if backing store not working
# set VTSWITCH to include virtual terminal switch code
# set FBREVERSE to reverse bit orders in 1,2,4 bpp
# set GRAYPALETTE to link with Gray Palette (valid only for 4bpp modes)
# set HAVETEXTMODE=Y for systems that can switch between text & graphics.
USE_EXPOSURE             = Y
VTSWITCH                 = N
FBREVERSE                = N
GRAYPALETTE              = N
HAVETEXTMODE             = N

####################################################################
# Screen pixel format
# If using Linux framebuffer, set to MWPF_TRUECOLORARGB, and use fbset.
# When running X11 or FBE, this sets the pixel emulation at runtime.
#
# On Linux or when running the standard framebuffer subdrivers,
# the runtime framebuffer BPP (bits per pixel) is used to select 
# the runtime screen subdriver.  However, the format of the pixel
# itself must be selected at compile time, which sets macros used
# for MWCOLORVAL color conversions and conversion blit byte order.
# This also sets sizeof(MWPIXELVAL) for optimizing buffers sizes
# in GrArea/GrReadArea.
#
# define MWPF_PALETTE       /* pixel is packed 8 bits 1, 4 or 8 pal index*/
# define MWPF_TRUECOLORARGB /* pixel is packed 32 bits byte order |B|G|R|A|*/
# define MWPF_TRUECOLORABGR /* pixel is packed 32 bits byte order |R|G|B|A|*/
# define MWPF_TRUECOLORRGB  /* pixel is packed 24 bits byte order |B|G|R|*/
# define MWPF_TRUECOLOR565  /* pixel is packed 16 bits little endian RGB565*/
# define MWPF_TRUECOLOR555  /* pixel is packed 16 bits little endian RGB555*/
# define MWPF_TRUECOLOR332  /* pixel is packed 8 bits RGB 332*/
# define MWPF_TRUECOLOR233  /* pixel is packed 8 bits BGR 332*/
# SCREEN_DEPTH is bits per pixel, only used with MWPF_PALETTE palette mode
####################################################################
SCREEN_PIXTYPE           = MWPF_TRUECOLORRGB
#SCREEN_PIXTYPE           = MWPF_TRUECOLORABGR
#SCREEN_PIXTYPE           = MWPF_TRUECOLOR565
SCREEN_DEPTH             = 16

####################################################################
# Screen drivers
# SCREEN=X11		X11
# SCREEN=FB			linux framebuffer
# SCREEN=FBE		framebuffer emulator
# SCREEN=SDL		SDL v2
# SCREEN=ALLEGRO	Allegro v5
####################################################################
SCREEN=FB

####################################################################
# Mouse drivers
# MOUSE=NOMOUSE		no mouse driver
# MOUSE=GPMMOUSE	gpm mouse
# MOUSE=SERMOUSE	serial Microsoft, PC, Logitech, PS/2 mice (/dev/psaux)
# MOUSE=DEVMICEMOUSE Use Linux /dev/input/mice driver
# MOUSE=TSLIBMOUSE	Use tslib (/dev/input/event0)
####################################################################
MOUSE=NOMOUSE

####################################################################
# Keyboard drivers
# KEYBOARD=NOKBD		no keyboard driver
# KEYBOARD=TTYKBD		tty keyboard
# KEYBOARD=SCANKBD		scanmode keyboard
# KEYBOARD=2NDKBD		two keyboards support
####################################################################
KEYBOARD=NOKBD

My configuration at the moment is where to take libraries and so far more questions, I do not have a lot of knowledge in C ++ and compilation

@ghaerr
Copy link
Owner

ghaerr commented Feb 12, 2025

For your libraries problem, it is saying that -lz cannot be found. Edit config and remove or comment out any LIBZ=-lz entries including the one under PNG support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants