forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Why does this make file not work?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Mon Jul 03, 2006 3:23 am    Post subject: Why does this make file not work? Reply with quote

Can anyone spot why this is ignoring the EE_LIBS line? It's definitely ignoring because I entered some made up name and it doesn't flag an error.

I'm trying to add the standard C lib so I can use rand() on the second tutorial.

-----------

#----------------------------------------------------------------------------
# File: Makefile
# Author: Tony Saveski, t_saveski@yahoo.com
#----------------------------------------------------------------------------
CC=ee-gcc
AS=ee-as
LD=ee-elf-ld
BMP2C=bmp2c

OBJ_DIR = obj
BMP_DIR = resources
EE_INCS += -I$(PS2SDK)/ee/include -I$(PS2SDK)/ee/dma/include -I$(GCCLIB)/include -I$(PS2GDB)/ee
EE_LIBS += -lgcc -lm -lkernel -lc -lsrrscall -ldebug -lpad


CFLAGS = -Wall -W -EL -G0 -O0 -mips3 -nostdlib -DPS2_EE

BMP_SRC = ff.c
C_SRC = g2.c demo2a.c $(BMP_SRC)
S_SRC = crt0.s ps2_asm.s dma_asm.s gs_asm.s

C_OBJ = $(addprefix $(OBJ_DIR)/, $(C_SRC:.c=.o))
S_OBJ = $(addprefix $(OBJ_DIR)/, $(S_SRC:.s=.o))

demo1.elf: $(C_OBJ) $(S_OBJ)
@echo "-------------------------------------------------"
$(CC) $(CFLAGS) -Tlinkfile -o demo2a.elf $(C_OBJ) $(S_OBJ) -Wl,-Map,demo2a.map

$(OBJ_DIR)/%.o: %.c
@echo "-------------------------------------------------"
$(CC) -c $(CFLAGS) $< -o $@

$(OBJ_DIR)/%.o: %.s
@echo "-------------------------------------------------"
$(CC) -xassembler-with-cpp -c $(CFLAGS) $< -o $@

%.c: $(BMP_DIR)/%.bmp
@echo "-------------------------------------------------"
$(BMP2C) $< $(*F) > $@

clean:
rm -f $(C_OBJ) $(S_OBJ) *.map *.elf $(BMP_SRC)

ff.c: $(BMP_DIR)/ff.bmp


Last edited by Kojima on Mon Jul 03, 2006 8:40 pm; edited 2 times in total
Back to top
View user's profile Send private message
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Mon Jul 03, 2006 4:21 am    Post subject: Reply with quote

EE_LIBS is part of the makefile template files (makefile.eeglobal, etc),and you aren't using them, you are just writing all your own rules... so of course it won't work.
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
evilo



Joined: 22 Apr 2004
Posts: 230

PostPosted: Mon Jul 03, 2006 4:26 am    Post subject: Reply with quote

furthermore, you should check/use the makefile samples from the SDK, those ones are quite old ;)
Back to top
View user's profile Send private message Visit poster's website
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Mon Jul 03, 2006 4:36 am    Post subject: Reply with quote

It won't compile with the sdk makefiles. I don't get it, I've looked through the ps2 sdk samples and not a single line (that I saw) actually invokes EE_LIBS etc.

How much work would it be to add lib support to the above makefile?
Back to top
View user's profile Send private message
evilo



Joined: 22 Apr 2004
Posts: 230

PostPosted: Mon Jul 03, 2006 9:18 am    Post subject: Reply with quote

usr\local\ps2dev\sdk\samples\Makefile.eeglobal

Code:

$(EE_BIN) : $(EE_OBJS) $(PS2SDK)/ee/startup/crt0.o
   $(EE_CC) -mno-crt0 -T$(PS2SDK)/ee/startup/linkfile $(EE_LDFLAGS) \
      -o $(EE_BIN) $(PS2SDK)/ee/startup/crt0.o $(EE_OBJS) $(EE_LIBS)


-o $(EE_BIN) $(PS2SDK)/ee/startup/crt0.o $(EE_OBJS) $(EE_LIBS)

hmm .... did you say something ??

:) :) :) :)
Back to top
View user's profile Send private message Visit poster's website
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Mon Jul 03, 2006 3:19 pm    Post subject: Reply with quote

You just made a very powerful enemy my friend.


:)

Thanks.
Back to top
View user's profile Send private message
evilo



Joined: 22 Apr 2004
Posts: 230

PostPosted: Mon Jul 03, 2006 4:35 pm    Post subject: Reply with quote

perfect :)

anyway, I hope to play your ps2 pong very soon now !
Back to top
View user's profile Send private message Visit poster's website
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Mon Jul 03, 2006 5:33 pm    Post subject: Reply with quote

You could play it now if I had any ftp space. My isp despite being one of the biggest companies in the uk(BT) are too cheap to give any for free.

I'll try looking for a free provider though.
Back to top
View user's profile Send private message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Mon Jul 03, 2006 5:37 pm    Post subject: Reply with quote

Man, I'm not having any luck with this makefile. If it's not too much trouble, could someone modify the one i posted up above to load libs please? I just don't know what to do.
Back to top
View user's profile Send private message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Mon Jul 03, 2006 7:30 pm    Post subject: Reply with quote

I managed it. I don't know how, perhaps voodoo magic, but its working now.

-Edit- Spoke too soon, although it works fine for C, my attempts to convert to C++ have almost worked but not quite,
it now fails, complaining about a missing strlen def. I've done the Extern "C" thing to all my sources but it's not working.

Here's the error,

Code:

C:\ps2dev\ps2sdk\ports\ps2tut_02a>make
-------------------------------------------------
ee-gcc -xassembler-with-cpp -c -Wall -W -EL -G0 -O0   -DPS2_EE ps2_asm.s -o obj/
ps2_asm.o
-------------------------------------------------
ee-gcc -xassembler-with-cpp -c -Wall -W -EL -G0 -O0   -DPS2_EE dma_asm.s -o obj/
dma_asm.o
-------------------------------------------------
ee-gcc -xassembler-with-cpp -c -Wall -W -EL -G0 -O0   -DPS2_EE gs_asm.s -o obj/g
s_asm.o
-------------------------------------------------
ee-gcc -Wall -W -EL -G0 -O0   -DPS2_EE -Tlinkfile -LC:/ps2dev/ps2sdk/ee/lib  -o
demo2a.elf obj/g2.o obj/demo2a.o obj/ps2_asm.o obj/dma_asm.o obj/gs_asm.o -lc -l
gcc -lm -lstdc++ -lsyscall -lc -lkernel -lc -lc -lc -Wl,-Map,demo2a.map
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/libgcc.a(unwind-dw2.o)(.text+0
x388): In function `extract_cie_info':
../../gcc/unwind-dw2.c:226: undefined reference to `strlen'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/libgcc.a(unwind-dw2-fde.o)(.te
xt+0x5d4): In function `get_cie_encoding':
../../gcc/unwind-dw2-fde.c:271: undefined reference to `strlen'
collect2: ld returned 1 exit status
make: *** [demo1.elf] Error 1

C:\ps2dev\ps2sdk\ports\ps2tut_02a>


Here's the makefile as is,
Code:

#----------------------------------------------------------------------------
# File:      Makefile
# Author:   Tony Saveski, t_saveski@yahoo.com
#----------------------------------------------------------------------------
CC=ee-gcc
AS=ee-as
LD=ee-elf-ld
BMP2C=bmp2c

OBJ_DIR = obj
BMP_DIR = resources
EE_INCS += -I$(PS2SDK)/ee/include -I$(PS2SDK)/ee/dma/include -I$(GCCLIB)/include -I$(PS2GDB)/ee
EE_LIBS += -lc -lgcc -lm -lstdc++ -lsyscall
EE_LDFLAGS := -L$(PS2SDK)/ee/lib $(EE_LDFLAGS)
CFLAGS = -Wall -W -EL -G0 -O0   -DPS2_EE
EE_LIBS += -lc -lkernel -lc -lc -lc


C_SRC = g2.cc demo2a.cc
S_SRC =  ps2_asm.s dma_asm.s gs_asm.s

C_OBJ = $(addprefix $(OBJ_DIR)/, $(C_SRC:.cc=.o))
S_OBJ = $(addprefix $(OBJ_DIR)/, $(S_SRC:.s=.o))

demo1.elf: $(C_OBJ) $(S_OBJ) $(PS2SDK)/ee/startup/linkfile
   @echo "-------------------------------------------------"
   $(CC) $(CFLAGS) -Tlinkfile $(EE_LDFLAGS)-o demo2a.elf $(C_OBJ) $(S_OBJ) $(EE_LIBS) -Wl,-Map,demo2a.map

$(OBJ_DIR)/%.o: %.cc
   @echo "-------------------------------------------------"
   $(CC) -c $(CFLAGS) $< -o $@

$(OBJ_DIR)/%.o: %.s
   @echo "-------------------------------------------------"
   $(CC) -xassembler-with-cpp -c $(CFLAGS) $< -o $@

%.c: $(BMP_DIR)/%.bmp
   @echo "-------------------------------------------------"
   $(BMP2C) $< $(*F) > $@

clean:
   rm -f $(C_OBJ) $(S_OBJ) *.map *.elf




Is it a missing lib?
Back to top
View user's profile Send private message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Mon Jul 03, 2006 8:34 pm    Post subject: Reply with quote

Fixed it, i had to order the libs, moving stdc to the second lib like so,

-lc -lstdc++ -lgcc -lm -lsyscall

in case anyone else runs into this problem.

-edit- well spoke too soon again, it compiles run but ps2link just says 'could not execute file host:demo20a.elf"
I opened up irlink and it seems to transfer about 30% of the file before aborting.
Any ideas why?

here's the current make file,

Code:

#----------------------------------------------------------------------------
# File:      Makefile
# Author:   Tony Saveski, t_saveski@yahoo.com
#----------------------------------------------------------------------------
CC=ee-gcc
AS=ee-as
LD=ee-elf-ld
BMP2C=bmp2c

OBJ_DIR = obj
BMP_DIR = resources
EE_INCS += -I$(PS2SDK)/ee/include -I$(PS2SDK)/ee/dma/include -I$(GCCLIB)/include -I$(PS2GDB)/ee
EE_LIBS += -lc -lstdc++ -lgcc -lm  -lsyscall
EE_LDFLAGS := -L$(PS2SDK)/ee/lib $(EE_LDFLAGS)
CFLAGS = -Wall -W -EL -G0 -O0   -DPS2_EE
EE_LIBS += -lc -lkernel -lc -lc -lc


C_SRC = g2.cc demo2a.cc
S_SRC =  ps2_asm.s dma_asm.s gs_asm.s

C_OBJ = $(addprefix $(OBJ_DIR)/, $(C_SRC:.cc=.o))
S_OBJ = $(addprefix $(OBJ_DIR)/, $(S_SRC:.s=.o))

demo1.elf: $(C_OBJ) $(S_OBJ)
   @echo "-------------------------------------------------"
   $(CC) $(CFLAGS) -Tlinkfile $(EE_LDFLAGS)-o demo2a.elf $(C_OBJ) $(S_OBJ) $(EE_LIBS) -Wl,-Map,demo2a.map

$(OBJ_DIR)/%.o: %.cc
   @echo "-------------------------------------------------"
   $(CC) -c $(CFLAGS) $< -o $@

$(OBJ_DIR)/%.o: %.s
   @echo "-------------------------------------------------"
   $(CC) -xassembler-with-cpp -c $(CFLAGS) $< -o $@

%.c: $(BMP_DIR)/%.bmp
   @echo "-------------------------------------------------"
   $(BMP2C) $< $(*F) > $@

clean:
   rm -f $(C_OBJ) $(S_OBJ) *.map *.elf




-Edit- Tried everything, removed just all compile flags that didn't cause a linker error, and still the same, flat out refuses to run. My pong game still runs fine, BUT once it's failed to load this, I have to do a soft or hard reset for anything else to run.

Any ideas why it's not working?
Back to top
View user's profile Send private message
evilo



Joined: 22 Apr 2004
Posts: 230

PostPosted: Mon Jul 03, 2006 10:37 pm    Post subject: Reply with quote

kojima,

please :

1st - don't use irlink, but prefer ps2client

2dn - don't reuse that makefile, and prefer a new one based on the SDK samples

check one of mine (from my smw port)
Code:

#                    Super Mario War / PS2
#------------------------------------------------------------------
# Copyright 2005 - Olivier "evilo" Biot <evilo13@gmail.com>
# Released under GNU license
# Review SMW README & LICENSE files for further details.
#------------------------------------------------------------------
# GCC 3.2.2 / PS2SDK 1.2 / GSKIT 0.2 / SDL 0.1
#------------------------------------------------------------------
# Compilation Flags
#
#------------------------------------------------------------------

EE_BIN      = smw.elf

EE_LIBS   += -L$(PS2SDK)/ports/lib -lsdlmain -lSDL_image -lsdlmixer -lsdl -ljpg -lmc -ldebug
EE_INCS   += -I../include -I$(PS2SDK)/ports/include -I$(PS2SDK)/ports/include/zlib -I$(PS2SDK)/ports/include/SDL

EE_CXXFLAGS += -mlong32 -DUSE_ROMFS -DSYS_LITTLE_ENDIAN -DSYS_NEED_ALIGNMENT -DUSE_RWOPS

EE_CFLAGS   += -DSYS_LITTLE_ENDIAN -DSYS_NEED_ALIGNMENT

GENROMFS_PATH = ../tools/genromfs
GENROMFS = $(GENROMFS_PATH)/genromfs
 

EE_OBJS = SFont.o \
     eyecandy.o \
     gamemodes.o \
     gfx.o \
     main.o \
     map.o \
     player.o \
     music_player.o \
     romdisk.o romfs.o romfs_io.o

romdisk.img:
   @echo Creating romdisk..
   @$(GENROMFS) -f $@ -d romdisk

romdisk.o: romdisk.img
   @$(PS2SDK)/bin/bin2o -a 16 -n romdisk.img romdisk.o romdisk
 
 
all:    build_romfs $(EE_BIN)
   $(EE_STRIP) $(EE_BIN)

build_romfs:
   $(MAKE) -C $(GENROMFS_PATH) all
clean:
   rm -f -R *.elf $(EE_OBJS)  romdisk.img
   $(MAKE) -C $(GENROMFS_PATH) clean

run:
   ps2client -h 192.168.0.100 execee host:$(EE_BIN) 
   
reset:
   ps2client -h 192.168.0.100 reset   


include Makefile.pref
include Makefile.eeglobal


good luck !
Back to top
View user's profile Send private message Visit poster's website
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Mon Jul 03, 2006 10:45 pm    Post subject: Reply with quote

I am using Ps2Client, I just used irlink to monitor how much of the file was transfered before it failed. IrLink doesn't even work anyway, aside from the transfer monitor.

I did try to make a new make file based on the samples, but it wouldn't compile saying there was no rule for the .o files, when there clearly was.

But shouldn't my one above work? It compiles fine, links fine, just doesn't run? All I did was change from C to C++, as I did with my pong game, and pong runs fine in C++.

No ideas at all how i could fix my one up? I'm learning just by tinkering with the sample makefiles and I understand how it works now, mostly(At least as far as getting something to compile and link goes)
but my knowledge isn't great enough to figure out why a perfectly compiled and link app fails to run.

In the words of Lennon. Help!

:)
Back to top
View user's profile Send private message
evilo



Joined: 22 Apr 2004
Posts: 230

PostPosted: Mon Jul 03, 2006 10:47 pm    Post subject: Reply with quote

with the new makefile rules, you must rename the .s to .S :)
Back to top
View user's profile Send private message Visit poster's website
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Mon Jul 03, 2006 11:44 pm    Post subject: Reply with quote

There are rules for that in eeglobal too as far as I can see.

I've just tried again, took my pong makefile, ee global and tried to make a new one based on both for the new app, and still it complains 'no rule to make target '/g2.o'

HEre's the main makefile

Code:

#  ____     ___ |    / _____ _____
# |  __    |    |___/    |     |
# |___| ___|    |    \ __|__   |     gsKit Open Source Project.
# ----------------------------------------------------------------------
# Copyright 2004 - Chris "Neovanglist" Gilbert <Neovanglist@LainOS.org>
# Licenced under Academic Free License version 2.0
# Review gsKit README & LICENSE files for further details.
#
# examples/basic/Makefile - Makefile for "basic" example.
#

EE_BIN = demo2a.elf


all: $(EE_BIN)

clean:
   rm -f *.erl *.o *.a

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal




and the modified eeglobal,

Code:

# _____     ___ ____     ___ ____
#  ____|   |    ____|   |        | |____|
# |     ___|   |____ ___|    ____| |    \    PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.
#
# $Id: Makefile.eeglobal_sample 1150 2005-06-12 11:42:08Z pixel $

OBJ_DIR = obj
BMP_DIR = resources
EE_INCS += -I$(PS2SDK)/ee/include -I$(PS2SDK)/ee/dma/include -I$(GCCLIB)/include -I$(PS2GDB)/ee
EE_LIBS += -lc -lstdc++ -lgcc -lm  -lsyscall
EE_LDFLAGS := -L$(PS2SDK)/ee/lib $(EE_LDFLAGS)

EE_LIBS += -lc -lkernel -lc -lc -lc

C_SRC = g2.cc demo2a.cc
S_SRC =  ps2_asm.s dma_asm.s gs_asm.s

C_OBJ = $(addprefix $(OBJ_DIR)/, $(C_SRC:.cc=.o))
S_OBJ = $(addprefix $(OBJ_DIR)/, $(S_SRC:.s=.o))

# Include directories
EE_INCS := -I$(PS2SDK)/ee/include -I$(PS2SDK)/common/include -I. $(EE_INCS)

# C compiler flags
EE_CFLAGS := -D_EE -O2 -G0 -Wall $(EE_CFLAGS)

# C++ compiler flags
EE_CXXFLAGS := -D_EE -O2 -G0 -Wall $(EE_CXXFLAGS)

# Linker flags


# Assembler flags
EE_ASFLAGS := -G0 $(EE_ASFLAGS)

# Link with following libraries.  This is a special case, and instead of
# allowing the user to override the library order, we always make sure
# libkernel is the last library to be linked.


# Externally defined variables: EE_BIN, EE_OBJS, EE_LIB

# These macros can be used to simplify certain build rules.
EE_C_COMPILE = $(EE_CC) $(EE_CFLAGS) $(EE_INCS)
EE_CXX_COMPILE = $(EE_CXX) $(EE_CXXFLAGS) $(EE_INCS)

%.o : %.c
   $(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@

%.o : %.cc
   $(EE_CXX) $(EE_CXXFLAGS) $(EE_INCS) -c $< -o $@

%.o : %.cpp
   $(EE_CXX) $(EE_CXXFLAGS) $(EE_INCS) -c $< -o $@

%.o : %.S
   $(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@

%.o : %.s
   $(EE_AS) $(EE_ASFLAGS) $< -o $@

$(EE_BIN) : $(C_OBJ) $(S_OBJ) $(PS2SDK)/ee/startup/crt0.o
   $(EE_CC) -mno-crt0 -T$(PS2SDK)/ee/startup/linkfile $(EE_LDFLAGS) \
      -o $(EE_BIN) $(PS2SDK)/ee/startup/crt0.o $(C_OBJ) $(S_OBJ) $(EE_LIBS)

$(EE_ERL) : $(EE_OBJS)
   $(EE_CC) -mno-crt0 -o $(EE_ERL) $(EE_OBJS) $(EE_CFLAGS) $(EE_LDFLAGS) -Wl,-r
   $(EE_STRIP) --strip-unneeded -R .mdebug.eabi64 -R .reginfo -R .comment $(EE_ERL)

$(EE_LIB) : $(EE_OBJS)
   $(EE_AR) cru $(EE_LIB) $(EE_OBJS)



Any ideas why this is failing? I don't know what else to try.

I live for the day someone releases a VC like ide for ps2 dev, that generates the makefile for you. :)
Back to top
View user's profile Send private message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Tue Jul 04, 2006 12:28 am    Post subject: Reply with quote

Well I've managed to get the new makefile compiling and linking just fine. But as before the final elf refuses to run on the ps2.

Code:

# _____     ___ ____     ___ ____
#  ____|   |    ____|   |        | |____|
# |     ___|   |____ ___|    ____| |    \    PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.
#
# $Id: Makefile.eeglobal_sample 1150 2005-06-12 11:42:08Z pixel $
CC=ee-gcc


OBJ_DIR = obj
BMP_DIR = resources
EE_INCS += -I$(PS2SDK)/ee/include -I$(PS2SDK)/ee/dma/include -I$(GCCLIB)/include -I$(PS2GDB)/ee
EE_LIBS += -lc -lstdc++ -lgcc -lm  -lsyscall
EE_LDFLAGS := -L$(PS2SDK)/ee/lib $(EE_LDFLAGS)

EE_LIBS += -lc -lkernel -lc -lc -lc

C_SRC = demo2a.cc
S_SRC =  ps2_asm.s dma_asm.s gs_asm.s

C_OBJ = g2.o demo2a.o
S_OBJ = ps2_asm.o dma_asm.o gs_asm.o

# Include directories
EE_INCS := -I$(PS2SDK)/ee/include -I$(PS2SDK)/common/include -I. $(EE_INCS)

# C compiler flags
EE_CFLAGS := -D_EE -O2 -G0 -Wall $(EE_CFLAGS)

# C++ compiler flags
EE_CXXFLAGS := -Wall -W -EL -G0 -O0   -DPS2_EE

# Linker flags


# Assembler flags
EE_ASFLAGS := -G0 $(EE_ASFLAGS)

# Link with following libraries.  This is a special case, and instead of
# allowing the user to override the library order, we always make sure
# libkernel is the last library to be linked.


# Externally defined variables: EE_BIN, EE_OBJS, EE_LIB

# These macros can be used to simplify certain build rules.
EE_C_COMPILE = $(EE_CC) $(EE_CFLAGS) $(EE_INCS)
EE_CXX_COMPILE = $(EE_CXX) $(EE_CXXFLAGS) $(EE_INCS)

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

%.o : %.cc
   $(EE_CXX) $(EE_CXXFLAGS) $(EE_INCS) -c $< -o $@

CFLAGS = -Wall -W -EL -G0 -O0 -mips3 -nostdlib -DPS2_EE

%.o : %.s
   $(CC) -xassembler-with-cpp -c $(CFLAGS) $< -o $@

$(EE_BIN) : $(C_OBJ) $(S_OBJ)
   $(EE_CC) $(CFLAGS) -mno-crt0 -Tlinkfile $(EE_LDFLAGS) \
      -o $(EE_BIN) $(PS2SDK)/ee/startup/crt0.o $(C_OBJ) $(S_OBJ) $(EE_LIBS)

$(EE_LIB) : $(EE_OBJS)
   $(EE_AR) cru $(EE_LIB) $(EE_OBJS)



Last edited by Kojima on Tue Jul 04, 2006 12:57 am; edited 1 time in total
Back to top
View user's profile Send private message
evilo



Joined: 22 Apr 2004
Posts: 230

PostPosted: Tue Jul 04, 2006 12:48 am    Post subject: Reply with quote

Seems that uint64 is not recognized..

be sure that g2.c include tamtypes.h
Back to top
View user's profile Send private message Visit poster's website
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Tue Jul 04, 2006 12:58 am    Post subject: Reply with quote

I fixed that problem, please check my edited post above, i got the makefile working(The new one) but the resulting elf fails to run still.

Makes. No. Sense.

edit- changed -Tlinkfile to -T$(PS2SDK)/ee/startup/linkfile and now it runs, but immediately after running it throws a EE exception "TLB store exception"

So it appears to be the linkfile is what's causing problems.
Back to top
View user's profile Send private message
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Tue Jul 04, 2006 1:15 am    Post subject: Reply with quote

FIXED! Thanks for all your help e.

turns out the exception was an unrelated mistake in my code, so the linkfile change did fix it afterall. So anyone who uses the tutorials as a base like i have, be sure to change linkfiles if you switch to C++.

Anyway expect LikeAllegro very soon, a old skool 2d library with per pixel fx like lighting etc :)
Back to top
View user's profile Send private message
evilo



Joined: 22 Apr 2004
Posts: 230

PostPosted: Tue Jul 04, 2006 1:34 am    Post subject: Reply with quote

Good that you fixed your issue !

concerning LikeAllegro, does it have something to do with Allegro ??

I hope you'll use gsKit as a base instead of the libdream tutorial .... libdream is great to see how the GS is working, but just lacks good performances :)
Back to top
View user's profile Send private message Visit poster's website
Kojima



Joined: 26 Jun 2006
Posts: 275

PostPosted: Tue Jul 04, 2006 2:36 am    Post subject: Reply with quote

Yeah, kind of like Allegro, Bitmaps etc, but won't be as fleshed out or based on allegro's code.

I will probably use gsKit for my second lib, I'm still learning so I think I'll use the tutorials mini-lib for now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group