OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> Question About Compiling Sz81
ckblackm
post Feb 16 2011, 11:39 AM
Post #1





Group: Members
Posts: 53
Joined: 9-January 05
Member No.: 6,171



I'm trying to compile SZ81 on beta 3. First off, just doing a simple make works and it compiles, but if I try to use the
Makefile.zaurus, I get an error. The Makefile.zaurus was originally used for the standard sharp rom, but I tried to change
it so that it would match the directory structure for pdaXrom.

Here is the modified Makefile.zaurus I used:
CODE
# You won't need to alter these
TARGET=$(shell cat TARGET)
SOURCES=sdl_main.c common.c sound.c z80.c sdl_engine.c sdl_hotspots.c \
    sdl_input.c sdl_loadsave.c sdl_resources.c sdl_sound.c sdl_video.c
OBJECTS=$(patsubst %.c, %.o, $(SOURCES))
VERSION=$(shell cat VERSION)
#export PREFIX=/opt/QtPalmtop
export PREFIX=/mnt/ide2/usr/local
PACKAGE_DATA_DIR=$(PREFIX)/share/$(TARGET)

# This uses the default cross compiler directory of /opt/Embedix and
# the default QPE directory of /opt/Qtopia
#
#DEVPREFIX=/opt/Qtopia/sharp
#CC=/opt/Embedix/tools/bin/arm-linux-gcc
DEVPREFIX=/opt/native/arm/3.4.6-xscale-softvfp
CC=/opt/native/arm/3.4.6-xscale-softvfp/bin/gcc
CFLAGS=-O3 -Wall -I$(DEVPREFIX)/include \
    `$(DEVPREFIX)/bin/sdl-config --prefix=$(DEVPREFIX) --cflags` \
    -DNO_DEBUG -DQWS -DPLATFORM_ZAURUS -DVERSION=\"$(VERSION)\" \
    -DPACKAGE_DATA_DIR=\"$(PACKAGE_DATA_DIR)\" -DOSS_SOUND_SUPPORT -DSZ81
LINK=$(CC)
LDFLAGS=-L$(DEVPREFIX)/lib
LIBS=`$(DEVPREFIX)/bin/sdl-config --prefix=$(DEVPREFIX) --libs`

# You won't need to alter anything below
all: $(SOURCES) $(TARGET)

$(TARGET): $(OBJECTS)
    $(LINK) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
    zaurus/build-$(TARGET)

%.o: %.c
    $(CC) $(CFLAGS) -c $< -o $@

.PHONY: all clean

clean:
    rm -f *.o


Here's the output I get:
CODE
# make -f Makefile.zaurus
/opt/native/arm/3.4.6-xscale-softvfp/bin/gcc -O3 -Wall -I/opt/native/arm/3.4.6-xscale-softvfp/include `/opt/native/arm/3.4.6-xscale-softvfp/bin/sdl-config --prefix=/opt/native/arm/3.4.6-xscale-softvfp --cflags` -DNO_DEBUG -DQWS -DPLATFORM_ZAURUS -DVERSION=\"2.1.7\" -DPACKAGE_DATA_DIR=\"/mnt/ide2/usr/local/share/sz81\" -DOSS_SOUND_SUPPORT -DSZ81  -c sdl_main.c -o sdl_main.o
/opt/native/arm/3.4.6-xscale-softvfp/bin/gcc -O3 -Wall -I/opt/native/arm/3.4.6-xscale-softvfp/include `/opt/native/arm/3.4.6-xscale-softvfp/bin/sdl-config --prefix=/opt/native/arm/3.4.6-xscale-softvfp --cflags` -DNO_DEBUG -DQWS -DPLATFORM_ZAURUS -DVERSION=\"2.1.7\" -DPACKAGE_DATA_DIR=\"/mnt/ide2/usr/local/share/sz81\" -DOSS_SOUND_SUPPORT -DSZ81  -c common.c -o common.o
/opt/native/arm/3.4.6-xscale-softvfp/bin/gcc -O3 -Wall -I/opt/native/arm/3.4.6-xscale-softvfp/include `/opt/native/arm/3.4.6-xscale-softvfp/bin/sdl-config --prefix=/opt/native/arm/3.4.6-xscale-softvfp --cflags` -DNO_DEBUG -DQWS -DPLATFORM_ZAURUS -DVERSION=\"2.1.7\" -DPACKAGE_DATA_DIR=\"/mnt/ide2/usr/local/share/sz81\" -DOSS_SOUND_SUPPORT -DSZ81  -c sound.c -o sound.o
/opt/native/arm/3.4.6-xscale-softvfp/bin/gcc -O3 -Wall -I/opt/native/arm/3.4.6-xscale-softvfp/include `/opt/native/arm/3.4.6-xscale-softvfp/bin/sdl-config --prefix=/opt/native/arm/3.4.6-xscale-softvfp --cflags` -DNO_DEBUG -DQWS -DPLATFORM_ZAURUS -DVERSION=\"2.1.7\" -DPACKAGE_DATA_DIR=\"/mnt/ide2/usr/local/share/sz81\" -DOSS_SOUND_SUPPORT -DSZ81  -c z80.c -o z80.o
/opt/native/arm/3.4.6-xscale-softvfp/bin/gcc -O3 -Wall -I/opt/native/arm/3.4.6-xscale-softvfp/include `/opt/native/arm/3.4.6-xscale-softvfp/bin/sdl-config --prefix=/opt/native/arm/3.4.6-xscale-softvfp --cflags` -DNO_DEBUG -DQWS -DPLATFORM_ZAURUS -DVERSION=\"2.1.7\" -DPACKAGE_DATA_DIR=\"/mnt/ide2/usr/local/share/sz81\" -DOSS_SOUND_SUPPORT -DSZ81  -c sdl_engine.c -o sdl_engine.o
/opt/native/arm/3.4.6-xscale-softvfp/bin/gcc -O3 -Wall -I/opt/native/arm/3.4.6-xscale-softvfp/include `/opt/native/arm/3.4.6-xscale-softvfp/bin/sdl-config --prefix=/opt/native/arm/3.4.6-xscale-softvfp --cflags` -DNO_DEBUG -DQWS -DPLATFORM_ZAURUS -DVERSION=\"2.1.7\" -DPACKAGE_DATA_DIR=\"/mnt/ide2/usr/local/share/sz81\" -DOSS_SOUND_SUPPORT -DSZ81  -c sdl_hotspots.c -o sdl_hotspots.o
/opt/native/arm/3.4.6-xscale-softvfp/bin/gcc -O3 -Wall -I/opt/native/arm/3.4.6-xscale-softvfp/include `/opt/native/arm/3.4.6-xscale-softvfp/bin/sdl-config --prefix=/opt/native/arm/3.4.6-xscale-softvfp --cflags` -DNO_DEBUG -DQWS -DPLATFORM_ZAURUS -DVERSION=\"2.1.7\" -DPACKAGE_DATA_DIR=\"/mnt/ide2/usr/local/share/sz81\" -DOSS_SOUND_SUPPORT -DSZ81  -c sdl_input.c -o sdl_input.o
/opt/native/arm/3.4.6-xscale-softvfp/bin/gcc -O3 -Wall -I/opt/native/arm/3.4.6-xscale-softvfp/include `/opt/native/arm/3.4.6-xscale-softvfp/bin/sdl-config --prefix=/opt/native/arm/3.4.6-xscale-softvfp --cflags` -DNO_DEBUG -DQWS -DPLATFORM_ZAURUS -DVERSION=\"2.1.7\" -DPACKAGE_DATA_DIR=\"/mnt/ide2/usr/local/share/sz81\" -DOSS_SOUND_SUPPORT -DSZ81  -c sdl_loadsave.c -o sdl_loadsave.o
/opt/native/arm/3.4.6-xscale-softvfp/bin/gcc -O3 -Wall -I/opt/native/arm/3.4.6-xscale-softvfp/include `/opt/native/arm/3.4.6-xscale-softvfp/bin/sdl-config --prefix=/opt/native/arm/3.4.6-xscale-softvfp --cflags` -DNO_DEBUG -DQWS -DPLATFORM_ZAURUS -DVERSION=\"2.1.7\" -DPACKAGE_DATA_DIR=\"/mnt/ide2/usr/local/share/sz81\" -DOSS_SOUND_SUPPORT -DSZ81  -c sdl_resources.c -o sdl_resources.o
/opt/native/arm/3.4.6-xscale-softvfp/bin/gcc -O3 -Wall -I/opt/native/arm/3.4.6-xscale-softvfp/include `/opt/native/arm/3.4.6-xscale-softvfp/bin/sdl-config --prefix=/opt/native/arm/3.4.6-xscale-softvfp --cflags` -DNO_DEBUG -DQWS -DPLATFORM_ZAURUS -DVERSION=\"2.1.7\" -DPACKAGE_DATA_DIR=\"/mnt/ide2/usr/local/share/sz81\" -DOSS_SOUND_SUPPORT -DSZ81  -c sdl_sound.c -o sdl_sound.o
/opt/native/arm/3.4.6-xscale-softvfp/bin/gcc -O3 -Wall -I/opt/native/arm/3.4.6-xscale-softvfp/include `/opt/native/arm/3.4.6-xscale-softvfp/bin/sdl-config --prefix=/opt/native/arm/3.4.6-xscale-softvfp --cflags` -DNO_DEBUG -DQWS -DPLATFORM_ZAURUS -DVERSION=\"2.1.7\" -DPACKAGE_DATA_DIR=\"/mnt/ide2/usr/local/share/sz81\" -DOSS_SOUND_SUPPORT -DSZ81  -c sdl_video.c -o sdl_video.o
/opt/native/arm/3.4.6-xscale-softvfp/bin/gcc -L/opt/native/arm/3.4.6-xscale-softvfp/lib  sdl_main.o  common.o  sound.o  z80.o  sdl_engine.o  sdl_hotspots.o  sdl_input.o  sdl_loadsave.o  sdl_resources.o  sdl_sound.o  sdl_video.o `/opt/native/arm/3.4.6-xscale-softvfp/bin/sdl-config --prefix=/opt/native/arm/3.4.6-xscale-softvfp --libs` -o sz81
/opt/native/arm/3.4.6-xscale-softvfp/lib/gcc/armv5tel-cacko-linux/3.4.6/../../../../armv5tel-cacko-linux/lib/crt1.o: In function `_start':
init.c:(.text+0x2c): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [sz81] Error 1


Any suggestions?
If you want to play with it yourself.. you can get it from
SZ81 website

thanks,
Christopher.
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
koan
post Feb 16 2011, 01:45 PM
Post #2





Group: Members
Posts: 328
Joined: 25-February 04
From: UK
Member No.: 2,025



Edit: Scratch what I said.

Wait, why are you trying to compile with the Zaurus makefile if you can compile with the standard makefile ?
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 30th October 2014 - 05:01 AM