Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
43 user(s) are online (25 user(s) are browsing Forums)

Members: 1
Guests: 42

clint, more...

Headlines

Report message:*
 

Re: Codebench and C++

Subject: Re: Codebench and C++
by kas1e on 2020/1/14 20:16:43

@arfcarl
That probably because of "../" , as equalent on amigaos are pure "/".

I.e. if you need on directory up, then "cd /", not "cd ../".

To make makefiles works both on amigaos4 natively and on corsscompiler, usually you made some vars in makefiles where you detect if it native or corsscompiler, and depends do the things. Like in that makefile we have for glsnoop:

ifneq ($(shell uname), AmigaOS)
    
CC         ppc-amigaos-gcc
    DELETE        
rm -f
    STRIP 
ppc-amigaos-strip
    AMIGADATE 
= $(shell date +"%-d.%-m.%Y")
else
    
CC         gcc
    DELETE        
delete
    STRIP 
strip
    AMIGADATE 
= $(shell date LFORMAT "%-d.%-m.%Y")
endif

NAME glSnoop
OBJS 
main.o ogles2_module.o warp3dnova_module.o logger.o gui.o common.o filter.o timer.o profiling.o
DEPS 
= $(OBJS:.o=.d)

CFLAGS = -Wall -Wextra -O3 -gstabs -D__AMIGA_DATE__="$(AMIGADATE)"

# Dependencies
%.: %.c
    
$(CC) -MM -MP -MT $(@:.d=.o) -$@ $< $(CFLAGS)

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

$(
NAME): $(OBJSmakefile
    
$(CC) -$@ $(OBJS) -lauto

clean
:
    $(
DELETE) $(OBJS)

strip:
    $(
STRIP) $(NAME)

ifneq ($(MAKECMDGOALS),clean)
-include $(
DEPS)
endif


In the same way you add something like "SEPARATOR" and use it later when need it: if it crosscompiler then "../" if it amigaos4 native then "/"

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project