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. |
|
|
|
![]() |
Feb 19 2011, 01:24 PM
Post
#2
|
|
|
Group: Members Posts: 318 Joined: 25-February 04 From: UK Member No.: 2,025 |
I would have thought that you should be able to use the regular makefile if you are compiling on pdaXrom just make sure that make can find gcc etc.
If you want to use the Zaurus makefile then you probably want to remove the -DPLATFORM_ZAURUS from CFLAGS as well as the changes you made. It would be worth grepping the code to find what is changed when PLATFORM_ZAURUS is defined. |
|
|
|
ckblackm Question About Compiling Sz81 Feb 16 2011, 11:39 AM
koan It looks to me like you don't have a main func... Feb 16 2011, 12:56 PM
ckblackm It's gotta be something with the make file....... Feb 16 2011, 01:38 PM
koan Edit: Scratch what I said.
Wait, why are you tryi... Feb 16 2011, 01:45 PM![]() ![]() |
|
Lo-Fi Version | Time is now: 21st May 2013 - 01:04 AM |