Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
51 user(s) are online (47 user(s) are browsing Forums)

Members: 0
Guests: 51

more...

Support us!

Headlines

 
  Register To Post  

(1) 2 »
Spot's porting CHALLENGE!
Just can't stay away
Just can't stay away


See User information
I released yet another update to my popular 'Spot's Porting for Dummies' today.
To celebrate that, I thought of a way to have some fun.

Let's have a challenge! A new version of a cool top down multiplayer shooter got released
recently. It's a quite easy port, it only involves some unix path fixing, and some changes to the makefile.

The first newbie porter that uploads version 0.4 will get an honorary mention in the next version of the guide! ;) I ported version 0.3, use the replace function on OS4Depot.

Here's the sources; http://icculus.org/cdogs-sdl/files/cdogs-sdl-current.tar.bz2
Here's the datafiles; http://icculus.org/cdogs-sdl/files/cdogs-data-current.tar.bz2

Non-first-porters, please leave this one for a first timer!

First timers, use the guide, and HAVE FUN! Let's get CDOGS 0.4 ported!

Go to top
Re: Spot's porting CHALLENGE!
Just can't stay away
Just can't stay away


See User information
@spotUP

dl and compiled!!! changed/added a few #ifdef __amigaos4__, but my main porblem is with SDLmixer, i think i have it not right installed (SDLmixer) please where to find it?

Compied using OS4 GCC 4.0.3 it works, but music is wrong played

wanna me to submit herre the changes?? just a couple of lines

Go to top
Re: Spot's porting CHALLENGE!
Amigans Defender
Amigans Defender


See User information
@jabirulo

I think the answer is in Spot's guide

In any event, it's on OS4Depot.

Chris

Go to top
Re: Spot's porting CHALLENGE!
Just can't stay away
Just can't stay away


See User information
@jabirulo

good work. don't post your changes until you have uploaded your final version to os4depot/aminet.

what errors exactly?

try this version;
http://www.os4depot.net/share/development/library/sdl_mixer.lha

Go to top
Re: Spot's porting CHALLENGE!
Just can't stay away
Just can't stay away


See User information
@jabirulo

If you're using the latest SDL_mixer from OS4Depot make sure you also install the latest SDL (v1.2.11) from:

http://www.rcdrummond.net/sdl/index.html

It is stated as a requirement in the readme.

Go to top
Re: Spot's porting CHALLENGE!
Just can't stay away
Just can't stay away


See User information
@spotUP

i get linking errors, bilding .o doesn't show errors (-Wall shows ome unusued vars, & uninitializaed vars too, but no big problems)

Compiling with NOMIX it createst the binary without problems, i get the errros below when trying SDL_MIXER.

Will sdl_mixer from os4depor &rcdrummon web site and tell what happens. BYE

Linking... (cdogs)
gcc cdogs.o draw.o pics.o actors.o map.o sounds.o defs.o objs.o gamedata.o ai.o triggers.o input.o prep.o hiscores.o automap.o mission.o game.o mainmenu.o password.o files.o menu.o joystick.o sprcomp.o grafx.o blit.o text.o keyboard.o events.o utils.o
drawtools.o -o cdogs -mcrt=newlib -lSDL_image -lpng -ljpeg -lSDL -lz -lm -mcrt=newlib -lSDL_mixer -lsmpeg -lvorbisfile -lvorbis -logg
SDK:local/newlib/lib/libSDL_mixer.a(mixer.o)(.text+0x8c8): In function `mix_channels':
: undefined reference to `SDL_MixAudio'
SDK:local/newlib/lib/libSDL_mixer.a(mixer.o)(.text+0xab4): In function `mix_channels':
: undefined reference to `SDL_MixAudio'
SDK:local/newlib/lib/libSDL_mixer.a(mixer.o)(.text+0xe30): In function `Mix_LoadWAV_RW':
: undefined reference to `SDL_LoadWAV_RW'
SDK:local/newlib/lib/libSDL_mixer.a(mixer.o)(.text+0xebc): In function `Mix_LoadWAV_RW':
: undefined reference to `SDL_FreeWAV'
SDK:local/newlib/lib/libSDL_mixer.a(mixer.o)(.text+0xf94): In function `Mix_LoadWAV_RW':
: undefined reference to `SDL_FreeWAV'
SDK:local/newlib/lib/libSDL_mixer.a(music_ogg.o)(.text+0x1fc): In function `OGG_playAudio':
: undefined reference to `SDL_MixAudio'
SDK:local/newlib/lib/libSDL_mixer.a(wavestream.o)(.text+0x200): In function `WAVStream_PlaySome':
: undefined reference to `SDL_MixAudio'
gmake: *** [cdogs] Error 1
#

Go to top
Re: Spot's porting CHALLENGE!
Just popping in
Just popping in


See User information
@jabirulo

Quote:
jabirulo wrote:
i get linking errors

When linking against static libraries, the order in which you link them is important. You're linking against SDL and SDL_mixer in the wrong order. SDL_mixer uses functions from SDL, so you need to specify SDL_mixer first.

For example:

gcc obj1.o obj2.o obj3.o -o my.exe -lSDL_mixer -lsmpeg -lvorbisfile -lvorbis -logg -lSDL_image -lpng -ljpeg -lSDL -lz -lm

Cheers,
Rich

Go to top
Re: Spot's porting CHALLENGE!
Just can't stay away
Just can't stay away


See User information
@spotUP

Wow, not easy for a dummy. A command line program would have been easier

Philippe 'Elwood' FERRUCCI
Sam460ex 1.10 Ghz
http://elwoodb.free.fr
Go to top
Re: Spot's porting CHALLENGE!
Just can't stay away
Just can't stay away


See User information
@evilrich

you're right, learned that by tryng and error no more problems, sound now works, perfectly, will try to upload ASAP on os4depot

THX to all

Go to top
Re: Spot's porting CHALLENGE!
Just popping in
Just popping in


See User information
@jabirulo

Would it be possible for you to share your makefile with those of us, that also have tried to solve the challenge, but failed bit time...

Go to top
Re: Spot's porting CHALLENGE!
Just can't stay away
Just can't stay away


See User information
@Controller

erm, well i'll think about it...

and i changed some lines in config.h events.c files.c input.c sounds.c & cdogs.c
if you want i can send them to you via PM

*** START OF MAKEFILE

# C-Dogs SDL Makefile

### Variables ###

# Make sure only one variable in the provided set is uncommented!

# Can be: "linux", "macosx", "xmingw" or "mingw32"
#SYSTEM := "macosx"
SYSTEM := "linux"
#SYSTEM := "xmingw"
#SYSTEM := "mingw32"

# Can be either: sdlmixer, nomix or oldmix
# sdlmixer is recommended, as you get proper music and sounds =)
SOUND_CODE := "sdlmixer"
#SOUND_CODE := "nomix"
#SOUND_CODE := "oldmix"

# Destdir is where the base dir where everything is installed
#DESTDIR := ../dist
DESTDIR := PROGDIR:

#DATA := ../data
DATA := PROGDIR:data

# Prefix is the *actual* base directory
# Bindir is where the cdogs binary is placed
# Datadir is where the data is
#PREFIX := /usr/local
#BINDIR := $(PREFIX)/games/bin
#DATADIR := $(PREFIX)/share/games/cdogs
#DOCDIR := $(PREFIX)/share/doc/cdogs

# The following are for a self-contained install
PREFIX := PROGDIR:
BINDIR := $(PREFIX)
DATADIR := $(PREFIX)data
CFGDIR := $(PREFIX)config
DOCDIR := $(PREFIX)doc

# intel, powerpc... uncomment only one (if at all)
#CF_ARCH += -march=pentium2 -mcpu=pentium2
CF_ARCH += -mcpu=G3 -mtune=G3
#CF_ARCH += -mcpu=G4 -mtune=G4 -maltivec

CF_OPTIMISE += -O2

CC := gcc
STRIP := strip

# Set to 1 for debugging
DEBUG=0
DEBUG_PROFILE=0

### Change this to yes, once you are ready
I_AM_CONFIGURED=yes

# Name of the cdogs binary (probably doesn't need to be changed)
CDOGS=cdogs
CDOGSED=cdogs-editor

# Suffix of the executable
PROG_SUFFIX :=


### Some logic to work out things

### Sound code
ifeq ($(SOUND_CODE), "sdlmixer")
DEFS += -DSND_SDLMIXER
endif

ifeq ($(SOUND_CODE), "nomix")
DEFS += -DSND_NOMIX
endif

# Just assume it's Linux, by default
ifeq ($(SYSTEM),)
SYSTEM := "linux"
endif

# detect MacOS X
ifeq ($(shell uname -s), Darwin)
SYSTEM := "macosx"
endif

### System specific parts

ifeq ($(SYSTEM), "macosx")
DEFS += -DSYS_MACOSX
LDFLAGS += -framework SDL -framework SDL_mixer -framework AppKit -framework Foundation

FRAMEWORK_DIR := /Library/Frameworks
SDL_FRAMEWORK := $(FRAMEWORK_DIR)/SDL.framework
SDLMIXER_FRAMEWORK := $(FRAMEWORK_DIR)/SDL_mixer.framework

INCLUDES += -I$(SDL_FRAMEWORK)/Headers

ifeq ($(SOUND_CODE), "sdlmixer")
INCLUDES += -I$(SDLMIXER_FRAMEWORK)/Headers
endif

EXTRA_OBJS = SDLmain.o
endif

ifeq ($(SYSTEM), "linux")
# LDFLAGS += $(shell sdl-config --libs)
# INCLUDES += $(shell sdl-config --cflags)
INCLUDES += -mcrt=newlib -ISDK:Local/common/include/SDL
LDFLAGS += -mcrt=newlib -lSDL_image -lpng -ljpeg -lSDL -lz -lm


ifeq ($(SOUND_CODE), "sdlmixer")
LDFLAGS += -lSDL_mixer -lsmpeg -lvorbisfile -lvorbis -logg -lstdc++ -lSDL
endif
endif

ifeq ($(SYSTEM), "xmingw")
CC := i386-mingw32msvc-gcc
STRIP := i386-mingw32msvc-strip
WINDRES := i386-mingw32msvc-windres

SDLCONFIG := i386-mingw32msvc-sdl-config

LDFLAGS += $(shell $(SDLCONFIG) --libs)
INCLUDES += $(shell $(SDLCONFIG) --cflags)

DEFS += -DSYS_WIN

ifeq ($(SOUND_CODE), "sdlmixer")
LDFLAGS += -lSDL_mixer
endif

PROG_SUFFIX := .exe

EXTRA_OBJS = rc.o
endif

ifeq ($(SYSTEM), "mingw32")
CC := mingw32-gcc
STRIP := mingw32-strip
WINDRES := mingw32-windres

SDLCONFIG := sdl-config

LDFLAGS += $(shell $(SDLCONFIG) --libs)
INCLUDES += $(shell $(SDLCONFIG) --cflags)

DEFS += -DSYS_WIN

ifeq ($(SOUND_CODE), "sdlmixer")
LDFLAGS += -lSDL_mixer
endif

PROG_SUFFIX := .exe

EXTRA_OBJS = rc.o
endif

### Debugging

ifeq ($(DEBUG), 1)
DEFS += -DCDOGS_DEBUG
CF_DEBUG += -ggdb -Wall

ifeq ($(DEBUG_PROFILE), 1)
CF_DEBUG += -pg
LDFLAGS += -pg
endif
else
# suppress warnings
CF_DEBUG += -w
endif



### No need to edit below here ###

CFLAGS += $(CF_OPTIMISE) $(CF_ARCH) $(CF_DEBUG)

INCLUDES += -Iinclude -Imissions
LDFLAGS +=
DEFS += -DCDOGS_DATA_DIR=\"$(DATADIR)\"

CDOGS_OBJS = \
cdogs.o draw.o pics.o actors.o map.o sounds.o defs.o objs.o \
gamedata.o ai.o triggers.o input.o prep.o hiscores.o automap.o \
mission.o game.o mainmenu.o password.o files.o menu.o joystick.o \
sprcomp.o grafx.o blit.o text.o keyboard.o events.o utils.o \
drawtools.o

CDOGSED_OBJS = \
cdogsed.o draw.o pics.o actors.o map.o sounds.o defs.o objs.o \
gamedata.o triggers.o input.o hiscores.o automap.o mission.o game.o \
ai.o charsed.o events.o files.o joystick.o sprcomp.o grafx.o blit.o text.o \
keyboard.o drawtools.o utils.o

### Targets ###

.PHONY: clean install info tidy help

help:
@echo "C-Dogs SDL Build System..."
@echo
@echo "REMEMBER TO EDIT THE MAKEFILE!"
@echo
@echo "Targets:"
@echo " * $(CDOGS) - build cdogs binary"
@echo " * $(CDOGSED) - build cdogs editor binary"
@echo " * install - install cdogs binary (and data)"
@echo " * info - show configuration"
@echo " * clean - clean tree for building"
@echo " * help - this help"
@echo
@echo "Usage: make <target>"

$(CDOGS): $(CDOGS_OBJS) $(EXTRA_OBJS)
@echo "Linking... ($(CDOGS))"
$(CC) $(CDOGS_OBJS) $(EXTRA_OBJS) -o $(CDOGS)$(PROG_SUFFIX) $(LDFLAGS)
@echo "Now type 'make install' as root!"

$(CDOGSED): $(CDOGSED_OBJS) $(EXTRA_OBJS)
@echo "Linking... ($(CDOGSED))"
@$(CC) $(CDOGSED_OBJS) $(EXTRA_OBJS) -o $(CDOGSED)$(PROG_SUFFIX) $(LDFLAGS)

.c.o: include/*.h
@if [ "$(I_AM_CONFIGURED)" != "yes" ] ; then \
echo "Have you really configured the Makefile?" ; \
echo "Change I_AM_CONFIGURED to yes" ; \
exit 1 ; \
fi

@echo "Compiling $<... (debug=$(DEBUG),profile=$(DEBUG_PROFILE))"

$(CC) \
$(CFLAGS) \
$(INCLUDES) \
$(DEFS) \
-c $<

# This is for Mac OS X
SDLmain.o: ../build/macosx/SDLmain.m ../build/macosx/SDLmain.h
@echo "Compiling SDLmain.m (MacOSX) (debug=$(DEBUG))"
@$(CC) \
$(CFLAGS) \
$(INCLUDES) \
-c ../build/macosx/SDLmain.m

# Windows resource
rc.o: ../build/windows/cdogs.rc ../build/windows/cdogs-icon.ico
@echo "Compiling Windows resourcs (cdogs.rc) (debug=$(DEBUG))"
$(WINDRES) -o rc.o -I ../build/windows/ ../build/windows/cdogs.rc

info:
@echo "=[ Program ]="
@echo "C-Dogs: $(CDOGS)$(PROG_SUFFIX)"
@echo "Editor: $(CDOGSED)$(PROG_SUFFIX)"
@echo ""
@echo "=[ System ]="
@echo "System: $(SYSTEM)"
@echo "Sound: $(SOUND_CODE)"
@echo ""
@echo "=[ Paths ]="
@echo "Prefix: $(PREFIX)"
@echo "Bin dir: $(BINDIR)"
@echo "Data dir: $(DATADIR)"
@echo "Doc dir: $(DOCDIR)"
@echo "Dest dir: $(DESTDIR)"
@echo ""
@echo "=[ Compilation ]="
@echo "CC: $(CC)"
@echo "CFLAGS: $(CFLAGS)"
@echo "INCLUDES: $(INCLUDES)"
@echo "DEFS: $(DEFS)"
@echo "LDFLAGS: $(LDFLAGS)"

install:
DESTDIR=$(DESTDIR) \
DOCDIR=$(DOCDIR) \
DATADIR=$(DATADIR) \
BINDIR=$(BINDIR) \
PREFIX=$(PREFIX) \
PROG=$(CDOGS)$(PROG_SUFFIX) \
LOCALDATA=$(DATA) \
LOCALDOCS="../doc/" \
./install.sh

clean:
rm -f *.o $(CDOGS)$(PROG_SUFFIX) $(CDOGSED)$(PROG_SUFFIX)

***END OF MAKEFILE

Go to top
Re: Spot's porting CHALLENGE!
Just popping in
Just popping in


See User information
@jabirulo

Since Tabs are significant in makefiles, maybe you should try reposting with preformatting tags such as <pre> before the text and </pre> after it.

Go to top
Re: Spot's porting CHALLENGE!
Not too shy to talk
Not too shy to talk


See User information
@spotUP

I still have some problem with my SDK (I believe it's not loaded properly, I need to check my Startup-Sequence)... I will try to look into it this weekend if I'm not too busy with gardening !...

Jerry



Defender of my A1XE-G4 / AOS4 Final Update !
Looking for a new toy ? Then try a GP2X...
Go to top
Re: Spot's porting CHALLENGE!
Just can't stay away
Just can't stay away


See User information
@Samurai_Crow

OK thx, didn't know i had to use HTML tags
Hope this time is more "readable"

<pre>

# C-Dogs SDL Makefile

### Variables ###

# Make sure only one variable in the provided set is uncommented!

# Can be: "linux", "macosx", "xmingw" or "mingw32"
#SYSTEM := "macosx"
SYSTEM := "linux"
#SYSTEM := "xmingw"
#SYSTEM := "mingw32"

# Can be either: sdlmixer, nomix or oldmix
# sdlmixer is recommended, as you get proper music and sounds =)
SOUND_CODE := "sdlmixer"
#SOUND_CODE := "nomix"
#SOUND_CODE := "oldmix"

# Destdir is where the base dir where everything is installed
#DESTDIR := ../dist
DESTDIR := PROGDIR:

#DATA := ../data
DATA := PROGDIR:data

# Prefix is the *actual* base directory
# Bindir is where the cdogs binary is placed
# Datadir is where the data is
#PREFIX := /usr/local
#BINDIR := $(PREFIX)/games/bin
#DATADIR := $(PREFIX)/share/games/cdogs
#DOCDIR := $(PREFIX)/share/doc/cdogs

# The following are for a self-contained install
PREFIX := PROGDIR:
BINDIR := $(PREFIX)
DATADIR := $(PREFIX)data
CFGDIR := $(PREFIX)config
DOCDIR := $(PREFIX)doc

# intel, powerpc... uncomment only one (if at all)
#CF_ARCH += -march=pentium2 -mcpu=pentium2
CF_ARCH += -mcpu=G3 -mtune=G3
#CF_ARCH += -mcpu=G4 -mtune=G4 -maltivec

CF_OPTIMISE += -O2

CC := gcc
STRIP := strip

# Set to 1 for debugging
DEBUG=0
DEBUG_PROFILE=0

### Change this to yes, once you are ready
I_AM_CONFIGURED=yes

# Name of the cdogs binary (probably doesn't need to be changed)
CDOGS=cdogs
CDOGSED=cdogs-editor

# Suffix of the executable
PROG_SUFFIX :=


### Some logic to work out things

### Sound code
ifeq ($(SOUND_CODE), "sdlmixer")
DEFS += -DSND_SDLMIXER
endif

ifeq ($(SOUND_CODE), "nomix")
DEFS += -DSND_NOMIX
endif

# Just assume it's Linux, by default
ifeq ($(SYSTEM),)
SYSTEM := "linux"
endif

# detect MacOS X
ifeq ($(shell uname -s), Darwin)
SYSTEM := "macosx"
endif

### System specific parts

ifeq ($(SYSTEM), "macosx")
DEFS += -DSYS_MACOSX
LDFLAGS += -framework SDL -framework SDL_mixer -framework AppKit -framework Foundation

FRAMEWORK_DIR := /Library/Frameworks
SDL_FRAMEWORK := $(FRAMEWORK_DIR)/SDL.framework
SDLMIXER_FRAMEWORK := $(FRAMEWORK_DIR)/SDL_mixer.framework

INCLUDES += -I$(SDL_FRAMEWORK)/Headers

ifeq ($(SOUND_CODE), "sdlmixer")
INCLUDES += -I$(SDLMIXER_FRAMEWORK)/Headers
endif

EXTRA_OBJS = SDLmain.o
endif

ifeq ($(SYSTEM), "linux")
# LDFLAGS += $(shell sdl-config --libs)
# INCLUDES += $(shell sdl-config --cflags)
INCLUDES += -mcrt=newlib -ISDK:Local/common/include/SDL
LDFLAGS += -mcrt=newlib -lSDL_image -lpng -ljpeg -lSDL -lz -lm


ifeq ($(SOUND_CODE), "sdlmixer")
LDFLAGS += -lSDL_mixer -lsmpeg -lvorbisfile -lvorbis -logg -lstdc++ -lSDL
endif
endif

ifeq ($(SYSTEM), "xmingw")
CC := i386-mingw32msvc-gcc
STRIP := i386-mingw32msvc-strip
WINDRES := i386-mingw32msvc-windres

SDLCONFIG := i386-mingw32msvc-sdl-config

LDFLAGS += $(shell $(SDLCONFIG) --libs)
INCLUDES += $(shell $(SDLCONFIG) --cflags)

DEFS += -DSYS_WIN

ifeq ($(SOUND_CODE), "sdlmixer")
LDFLAGS += -lSDL_mixer
endif

PROG_SUFFIX := .exe

EXTRA_OBJS = rc.o
endif

ifeq ($(SYSTEM), "mingw32")
CC := mingw32-gcc
STRIP := mingw32-strip
WINDRES := mingw32-windres

SDLCONFIG := sdl-config

LDFLAGS += $(shell $(SDLCONFIG) --libs)
INCLUDES += $(shell $(SDLCONFIG) --cflags)

DEFS += -DSYS_WIN

ifeq ($(SOUND_CODE), "sdlmixer")
LDFLAGS += -lSDL_mixer
endif

PROG_SUFFIX := .exe

EXTRA_OBJS = rc.o
endif

### Debugging

ifeq ($(DEBUG), 1)
DEFS += -DCDOGS_DEBUG
CF_DEBUG += -ggdb -Wall

ifeq ($(DEBUG_PROFILE), 1)
CF_DEBUG += -pg
LDFLAGS += -pg
endif
else
# suppress warnings
CF_DEBUG += -w
endif



### No need to edit below here ###

CFLAGS += $(CF_OPTIMISE) $(CF_ARCH) $(CF_DEBUG)

INCLUDES += -Iinclude -Imissions
LDFLAGS +=
DEFS += -DCDOGS_DATA_DIR=\"$(DATADIR)\"

CDOGS_OBJS = \
cdogs.o draw.o pics.o actors.o map.o sounds.o defs.o objs.o \
gamedata.o ai.o triggers.o input.o prep.o hiscores.o automap.o \
mission.o game.o mainmenu.o password.o files.o menu.o joystick.o \
sprcomp.o grafx.o blit.o text.o keyboard.o events.o utils.o \
drawtools.o

CDOGSED_OBJS = \
cdogsed.o draw.o pics.o actors.o map.o sounds.o defs.o objs.o \
gamedata.o triggers.o input.o hiscores.o automap.o mission.o game.o \
ai.o charsed.o events.o files.o joystick.o sprcomp.o grafx.o blit.o text.o \
keyboard.o drawtools.o utils.o

### Targets ###

.PHONY: clean install info tidy help

help:
@echo "C-Dogs SDL Build System..."
@echo
@echo "REMEMBER TO EDIT THE MAKEFILE!"
@echo
@echo "Targets:"
@echo " * $(CDOGS) - build cdogs binary"
@echo " * $(CDOGSED) - build cdogs editor binary"
@echo " * install - install cdogs binary (and data)"
@echo " * info - show configuration"
@echo " * clean - clean tree for building"
@echo " * help - this help"
@echo
@echo "Usage: make <target>"

$(CDOGS): $(CDOGS_OBJS) $(EXTRA_OBJS)
@echo "Linking... ($(CDOGS))"
$(CC) $(CDOGS_OBJS) $(EXTRA_OBJS) -o $(CDOGS)$(PROG_SUFFIX) $(LDFLAGS)
@echo "Now type 'make install' as root!"

$(CDOGSED): $(CDOGSED_OBJS) $(EXTRA_OBJS)
@echo "Linking... ($(CDOGSED))"
@$(CC) $(CDOGSED_OBJS) $(EXTRA_OBJS) -o $(CDOGSED)$(PROG_SUFFIX) $(LDFLAGS)

.c.o: include/*.h
@if [ "$(I_AM_CONFIGURED)" != "yes" ] ; then \
echo "Have you really configured the Makefile?" ; \
echo "Change I_AM_CONFIGURED to yes" ; \
exit 1 ; \
fi

@echo "Compiling $<... (debug=$(DEBUG),profile=$(DEBUG_PROFILE))"

$(CC) \
$(CFLAGS) \
$(INCLUDES) \
$(DEFS) \
-c $<

# This is for Mac OS X
SDLmain.o: ../build/macosx/SDLmain.m ../build/macosx/SDLmain.h
@echo "Compiling SDLmain.m (MacOSX) (debug=$(DEBUG))"
@$(CC) \
$(CFLAGS) \
$(INCLUDES) \
-c ../build/macosx/SDLmain.m

# Windows resource
rc.o: ../build/windows/cdogs.rc ../build/windows/cdogs-icon.ico
@echo "Compiling Windows resourcs (cdogs.rc) (debug=$(DEBUG))"
$(WINDRES) -o rc.o -I ../build/windows/ ../build/windows/cdogs.rc

info:
@echo "=[ Program ]="
@echo "C-Dogs: $(CDOGS)$(PROG_SUFFIX)"
@echo "Editor: $(CDOGSED)$(PROG_SUFFIX)"
@echo ""
@echo "=[ System ]="
@echo "System: $(SYSTEM)"
@echo "Sound: $(SOUND_CODE)"
@echo ""
@echo "=[ Paths ]="
@echo "Prefix: $(PREFIX)"
@echo "Bin dir: $(BINDIR)"
@echo "Data dir: $(DATADIR)"
@echo "Doc dir: $(DOCDIR)"
@echo "Dest dir: $(DESTDIR)"
@echo ""
@echo "=[ Compilation ]="
@echo "CC: $(CC)"
@echo "CFLAGS: $(CFLAGS)"
@echo "INCLUDES: $(INCLUDES)"
@echo "DEFS: $(DEFS)"
@echo "LDFLAGS: $(LDFLAGS)"

install:
DESTDIR=$(DESTDIR) \
DOCDIR=$(DOCDIR) \
DATADIR=$(DATADIR) \
BINDIR=$(BINDIR) \
PREFIX=$(PREFIX) \
PROG=$(CDOGS)$(PROG_SUFFIX) \
LOCALDATA=$(DATA) \
LOCALDOCS="../doc/" \
./install.sh

clean:
rm -f *.o $(CDOGS)$(PROG_SUFFIX) $(CDOGSED)$(PROG_SUFFIX)

</pre>

Go to top
Re: Spot's porting CHALLENGE!
Just can't stay away
Just can't stay away


See User information
@jabirulo

Thanx for sharing and participating!
I love how this thread has evolved!
Good work on the port there!! I hope we'll see more from you.

I promise to give you the honorary mention in the next version of the holy guide ;)

And, to those of you who wasn't as quick as jabirulo, do you think this was a good idea?

Shall we do it again? If so, the next time i find something that is easilly ported, and this time i'll make sure it's really easy, i could start porting challenge #2 and post the link to the sources.

And if you guys run into problems, i promise to monitor the thread and do my best to help out!

Go to top
Re: Spot's porting CHALLENGE!
Just can't stay away
Just can't stay away


See User information
@jabirulo

I suggest if you can you upload the Makefile somewhere and then link to it from here as that way there is no risk that the forum code breaks it by removing whitespace/changing tabs into spaces or whatever.

If that's not a possibility you could try [ code ] [ /code ] tags or maybe use the "code paste" function on utilitybase.com...

Go to top
Re: Spot's porting CHALLENGE!
Just popping in
Just popping in


See User information
@spotUP

I'd love to get into this, but alas, I have no A1 :(

tiffers

Go to top
Re: Spot's porting CHALLENGE!
Just can't stay away
Just can't stay away


See User information
@spotUP

yes please 2nd challlenge, so i can learn a bit more of porting stuff. Tried some other games, but too much .c/.cpp files and they compie OK but don't link still trying to port/understand how they can be compiled under OS4


@salas00

OK will try to put it on my web page ASAP, makefile and .c/.h i modified (thru #define __amigaos4__)

THX & BYE

Go to top
Re: Spot's porting CHALLENGE!
Just can't stay away
Just can't stay away


See User information
@jabirulo

if you've made it as far as to the linking phase, you're practically in the goal already.
check my porting for dummies, copy/paste the libs in my sdl configure line, and copy them to your makefiles, that should do it, if not, try to move the libs around.
sometimes it helps to change it from 1.o 2.o 3.o lib.1 lib2.lib3 -o test.exe ... to lib.1 lib.2 lib.2 1.o 2.o 3.o -o test.exe ... dunno why it is like this.
But his should make your apps link.
If not, mail them to me and i'll have a look at them and send the fixed makefiles back to you to have a look at.

Go to top
Re: Spot's porting CHALLENGE!
Just popping in
Just popping in


See User information
@spotUP

The reason the order of the linker libraries and object files is significant is that the one with the most dependencies on the other libraries has to be listed first so that the linker will know what to look for in the later object files and linker libraries.

Go to top

  Register To Post
(1) 2 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project