Git Product home page Git Product logo

Comments (29)

bebbo avatar bebbo commented on August 28, 2024 1

if symlinks exists, they are used :-)
I could add symlink creation to sdk install

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024 1

I will look tomorrow - I pushed what I already did.

from amiga-gcc.

HenrykRichter avatar HenrykRichter commented on August 28, 2024 1

I knew that this thing would be going to haunt me. Yes, you both are absolutely right. There are redundant files in this particular Amiga SDL port. I didn't find time and motivation to clean the source up, as of yet.

FWIW, I've deleted the superfluous includes and kept only the SDL subdirectory. The lib builds just as fine. As Bebbo pointed out, inttypes.h is not really necessary to build SDL itself. Hence, it is disabled now in SDL_config_amigaos.h.

Hope it helps along a little.

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

You have to make a decision:
a) provide a sdk file
use this to install precompile binaries
b) provide a Makefile snippet
this gets added to the Makefile itself. Maybe we find a comfortable way to provide separate Makefiles for such a purpose.

A simple starting point is the integration of libdebug:

# =================================================
# libdebug
# =================================================
CONFIG_LIBDEBUG = --prefix=$(PREFIX) --target=m68k-amigaos --host=m68k-amigaos 

libdebug: build/libdebug/_done

build/libdebug/_done: build/libdebug/Makefile
	cd build/libdebug && $(MAKE)
	cp build/libdebug/libdebug.a $(PREFIX)/m68k-amigaos/lib/
	echo "done" >build/libdebug/_done

build/libdebug/Makefile: build/libnix/Makefile projects/libdebug/configure $(shell find 2>/dev/null projects/libdebug -not \( -path projects/libdebug/.git -prune \) -type f)
	mkdir -p build/libdebug
	cd build/libdebug && $(A) $(PWD)/projects/libdebug/configure $(CONFIG_LIBDEBUG)

projects/libdebug/configure:
	@mkdir -p projects
	cd projects &&	git clone -b master --depth 4 https://github.com/bebbo/libdebug

projects/libdebug/configure is a file which always exists after cloning.

Here is a configure command invoked to create the Makefile in the build folder.
Otherwise I use rsync to copy all files.

Then I invoke the makefile and install the files.

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

first try:

CONFIG_LIBSDL12 = PREFX=$(PREFIX) PREF=$(PREFIX)  

libSDL12: build/libSDL12/_done

build/libSDL12/_done: build/libSDL12/Makefile.bax
	cd build/libSDL12 && $(MAKE) -f Makefile.bax $(CONFIG_LIBSDL12)
	cp build/libSDL12/libsdl.a $(PREFIX)/m68k-amigaos/lib/
	echo "done" >build/libsdl/_done

build/libSDL12/Makefile.bax: build/libnix/Makefile projects/libSDL12/Makefile.bax $(shell find 2>/dev/null projects/libSDL12 -not \( -path projects/libSDL12/.git -prune \) -type f)
	mkdir -p build/libSDL12
	rsync -a projects/libSDL12/* build/libSDL12 

projects/libSDL12/Makefile.bax:
	@mkdir -p projects
	cd projects &&	git clone -b master --depth 4  https://github.com/AmigaPorts/libSDL12

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024
./include/SDL_stdinc.h:66:23: fatal error: inttypes.h: No such file or directory
 # include <inttypes.h>

from amiga-gcc.

MBeijer avatar MBeijer commented on August 28, 2024

I have asked Henryk Richter (author of the libSDL12 repo) to join us in this issue with his input. So please leave this open. :)

from amiga-gcc.

MBeijer avatar MBeijer commented on August 28, 2024

inttypes.h is always an issue for me with your toolchain, which is why I have added my own inttypes.h file in /opt/m68k-amigaos/include:

/*
 * Copyright (c) 2004, 2005 by
 * Ralf Corsepius, Ulm/Germany. All rights reserved.
 *
 * Permission to use, copy, modify, and distribute this software
 * is freely granted, provided that this notice is preserved.
 */

/**
 *  @file  inttypes.h
 */

#ifndef _INTTYPES_H
#define _INTTYPES_H

#include <stdint.h>
#define __need_wchar_t
#include <stdlib.h>

#define __STRINGIFY(a) #a

/* 8-bit types */
#define __PRI8(x) __STRINGIFY(x)
#define __SCN8(x) __STRINGIFY(hh##x)


#define PRId8           __PRI8(d)
#define PRIi8           __PRI8(i)
#define PRIo8           __PRI8(o)
#define PRIu8           __PRI8(u)
#define PRIx8           __PRI8(x)
#define PRIX8           __PRI8(X)

#define SCNd8           __SCN8(d)
#define SCNi8           __SCN8(i)
#define SCNo8           __SCN8(o)
#define SCNu8           __SCN8(u)
#define SCNx8           __SCN8(x)


#define PRIdLEAST8      __PRI8(d)
#define PRIiLEAST8      __PRI8(i)
#define PRIoLEAST8      __PRI8(o)
#define PRIuLEAST8      __PRI8(u)
#define PRIxLEAST8      __PRI8(x)
#define PRIXLEAST8      __PRI8(X)

#define SCNdLEAST8      __SCN8(d)
#define SCNiLEAST8      __SCN8(i)
#define SCNoLEAST8      __SCN8(o)
#define SCNuLEAST8      __SCN8(u)
#define SCNxLEAST8      __SCN8(x)


#define PRIdFAST8       __PRI8(d)
#define PRIiFAST8       __PRI8(i)
#define PRIoFAST8       __PRI8(o)
#define PRIuFAST8       __PRI8(u)
#define PRIxFAST8       __PRI8(x)
#define PRIXFAST8       __PRI8(X)

#define SCNdFAST8       __SCN8(d)
#define SCNiFAST8       __SCN8(i)
#define SCNoFAST8       __SCN8(o)
#define SCNuFAST8       __SCN8(u)
#define SCNxFAST8       __SCN8(x)

/* 16-bit types */
#define __PRI16(x) __STRINGIFY(x)
#define __SCN16(x) __STRINGIFY(h##x)


#define PRId16          __PRI16(d)
#define PRIi16          __PRI16(i)
#define PRIo16          __PRI16(o)
#define PRIu16          __PRI16(u)
#define PRIx16          __PRI16(x)
#define PRIX16          __PRI16(X)

#define SCNd16          __SCN16(d)
#define SCNi16          __SCN16(i)
#define SCNo16          __SCN16(o)
#define SCNu16          __SCN16(u)
#define SCNx16          __SCN16(x)


#define PRIdLEAST16     __PRI16(d)
#define PRIiLEAST16     __PRI16(i)
#define PRIoLEAST16     __PRI16(o)
#define PRIuLEAST16     __PRI16(u)
#define PRIxLEAST16     __PRI16(x)
#define PRIXLEAST16     __PRI16(X)

#define SCNdLEAST16     __SCN16(d)
#define SCNiLEAST16     __SCN16(i)
#define SCNoLEAST16     __SCN16(o)
#define SCNuLEAST16     __SCN16(u)
#define SCNxLEAST16     __SCN16(x)


#define PRIdFAST16      __PRI16(d)
#define PRIiFAST16      __PRI16(i)
#define PRIoFAST16      __PRI16(o)
#define PRIuFAST16      __PRI16(u)
#define PRIxFAST16      __PRI16(x)
#define PRIXFAST16      __PRI16(X)

#define SCNdFAST16      __SCN16(d)
#define SCNiFAST16      __SCN16(i)
#define SCNoFAST16      __SCN16(o)
#define SCNuFAST16      __SCN16(u)
#define SCNxFAST16      __SCN16(x)

/* 32-bit types */
#if __have_long32
#define __PRI32(x) __STRINGIFY(l##x)
#define __SCN32(x) __STRINGIFY(l##x)
#else
#define __PRI32(x) __STRINGIFY(x)
#define __SCN32(x) __STRINGIFY(x)
#endif

#define PRId32          __PRI32(d)
#define PRIi32          __PRI32(i)
#define PRIo32          __PRI32(o)
#define PRIu32          __PRI32(u)
#define PRIx32          __PRI32(x)
#define PRIX32          __PRI32(X)

#define SCNd32          __SCN32(d)
#define SCNi32          __SCN32(i)
#define SCNo32          __SCN32(o)
#define SCNu32          __SCN32(u)
#define SCNx32          __SCN32(x)


#define PRIdLEAST32     __PRI32(d)
#define PRIiLEAST32     __PRI32(i)
#define PRIoLEAST32     __PRI32(o)
#define PRIuLEAST32     __PRI32(u)
#define PRIxLEAST32     __PRI32(x)
#define PRIXLEAST32     __PRI32(X)

#define SCNdLEAST32     __SCN32(d)
#define SCNiLEAST32     __SCN32(i)
#define SCNoLEAST32     __SCN32(o)
#define SCNuLEAST32     __SCN32(u)
#define SCNxLEAST32     __SCN32(x)


#define PRIdFAST32      __PRI32(d)
#define PRIiFAST32      __PRI32(i)
#define PRIoFAST32      __PRI32(o)
#define PRIuFAST32      __PRI32(u)
#define PRIxFAST32      __PRI32(x)
#define PRIXFAST32      __PRI32(X)

#define SCNdFAST32      __SCN32(d)
#define SCNiFAST32      __SCN32(i)
#define SCNoFAST32      __SCN32(o)
#define SCNuFAST32      __SCN32(u)
#define SCNxFAST32      __SCN32(x)


/* 64-bit types */
#if __have_longlong64
#define __PRI64(x) __STRINGIFY(ll##x)
#define __SCN64(x) __STRINGIFY(ll##x)
#elif __have_long64
#define __PRI64(x) __STRINGIFY(l##x)
#define __SCN64(x) __STRINGIFY(l##x)
#else
#define __PRI64(x) __STRINGIFY(x)
#define __SCN64(x) __STRINGIFY(x)
#endif

#define PRId64          __PRI64(d)
#define PRIi64          __PRI64(i)
#define PRIo64          __PRI64(o)
#define PRIu64          __PRI64(u)
#define PRIx64          __PRI64(x)
#define PRIX64          __PRI64(X)

#define SCNd64          __SCN64(d)
#define SCNi64          __SCN64(i)
#define SCNo64          __SCN64(o)
#define SCNu64          __SCN64(u)
#define SCNx64          __SCN64(x)

#if __int64_t_defined
#define PRIdLEAST64     __PRI64(d)
#define PRIiLEAST64     __PRI64(i)
#define PRIoLEAST64     __PRI64(o)
#define PRIuLEAST64     __PRI64(u)
#define PRIxLEAST64     __PRI64(x)
#define PRIXLEAST64     __PRI64(X)

#define SCNdLEAST64     __SCN64(d)
#define SCNiLEAST64     __SCN64(i)
#define SCNoLEAST64     __SCN64(o)
#define SCNuLEAST64     __SCN64(u)
#define SCNxLEAST64     __SCN64(x)


#define PRIdFAST64      __PRI64(d)
#define PRIiFAST64      __PRI64(i)
#define PRIoFAST64      __PRI64(o)
#define PRIuFAST64      __PRI64(u)
#define PRIxFAST64      __PRI64(x)
#define PRIXFAST64      __PRI64(X)

#define SCNdFAST64      __SCN64(d)
#define SCNiFAST64      __SCN64(i)
#define SCNoFAST64      __SCN64(o)
#define SCNuFAST64      __SCN64(u)
#define SCNxFAST64      __SCN64(x)
#endif

/* max-bit types */
#if __have_longlong64
#define __PRIMAX(x) __STRINGIFY(ll##x)
#define __SCNMAX(x) __STRINGIFY(ll##x)
#elif __have_long64
#define __PRIMAX(x) __STRINGIFY(l##x)
#define __SCNMAX(x) __STRINGIFY(l##x)
#else
#define __PRIMAX(x) __STRINGIFY(x)
#define __SCNMAX(x) __STRINGIFY(x)
#endif

#define PRIdMAX         __PRIMAX(d)
#define PRIiMAX         __PRIMAX(i)
#define PRIoMAX         __PRIMAX(o)
#define PRIuMAX         __PRIMAX(u)
#define PRIxMAX         __PRIMAX(x)
#define PRIXMAX         __PRIMAX(X)

#define SCNdMAX         __SCNMAX(d)
#define SCNiMAX         __SCNMAX(i)
#define SCNoMAX         __SCNMAX(o)
#define SCNuMAX         __SCNMAX(u)
#define SCNxMAX         __SCNMAX(x)

/* ptr types */
#if __have_longlong64
#define __PRIPTR(x) __STRINGIFY(ll##x)
#define __SCNPTR(x) __STRINGIFY(ll##x)
#elif __have_long64
#define __PRIPTR(x) __STRINGIFY(l##x)
#define __SCNPTR(x) __STRINGIFY(l##x)
#else
#define __PRIPTR(x) __STRINGIFY(x)
#define __SCNPTR(x) __STRINGIFY(x)
#endif

#define PRIdPTR         __PRIPTR(d)
#define PRIiPTR         __PRIPTR(i)
#define PRIoPTR         __PRIPTR(o)
#define PRIuPTR         __PRIPTR(u)
#define PRIxPTR         __PRIPTR(x)
#define PRIXPTR         __PRIPTR(X)

#define SCNdPTR         __SCNPTR(d)
#define SCNiPTR         __SCNPTR(i)
#define SCNoPTR         __SCNPTR(o)
#define SCNuPTR         __SCNPTR(u)
#define SCNxPTR         __SCNPTR(x)


typedef struct {
  intmax_t      quot;
  intmax_t      rem;
} imaxdiv_t;

#ifdef __cplusplus
extern "C" {
#endif

extern intmax_t  imaxabs(intmax_t j);
extern imaxdiv_t imaxdiv(intmax_t numer, intmax_t denomer);
extern intmax_t  strtoimax(const char *__restrict, char **__restrict, int);
extern uintmax_t strtoumax(const char *__restrict, char **__restrict, int);
extern intmax_t  wcstoimax(const wchar_t *__restrict, wchar_t **__restrict, int);
extern uintmax_t wcstoumax(const wchar_t *__restrict, wchar_t **__restrict, int);

#ifdef __cplusplus
}
#endif

#endif

from amiga-gcc.

MBeijer avatar MBeijer commented on August 28, 2024

I believe I've mentioned this before, but been told I've done something wrong. Eventually I just added the file myself.

It's required for me to compile MilkyTracker as well.

from amiga-gcc.

MBeijer avatar MBeijer commented on August 28, 2024

I don't know how much of this file is actually needed.

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

I'll add it to ixemul --> ends up in sys-includes

next:

ideo/amigaos/SDL_cgxvideo.c:40:41: fatal error: cybergraphics/cybergraphics.h: No such file or directory
 #include <cybergraphics/cybergraphics.h>

it depends on the cgx.sdk

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

but there it is CGraphX/C/Include/cybergraphx/cybergraphics.h

from amiga-gcc.

MBeijer avatar MBeijer commented on August 28, 2024

Yeah, for some reason the include path for cybergraphics has changed between cybergraphx and cybergraphics between generations. While one is still used in MorphOS, another is used in your toolchain. And depending on source I've been working with it's been switched around. Pretty stupid.
How does the toolchain handle symlinks?

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

next one:

-I/opt/amiga/os-include

should be
/$(PREFX)/m68k-amigaos/sys-include

no?

from amiga-gcc.

MBeijer avatar MBeijer commented on August 28, 2024

yup, it differs on older GCC toolchains, especially if you use the old gg toolchain in Workbench

from amiga-gcc.

MBeijer avatar MBeijer commented on August 28, 2024

I added you to the SDL team on AmigaPorts. Feel free to make changes to the libSDL12 repo.

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

make libSDL12 is built now.

But the headers are currently not installed, because I don't like the fact that all headers are duplicated.
I'd prefer having the SDL headers in the SDL folder.

from amiga-gcc.

MBeijer avatar MBeijer commented on August 28, 2024

from amiga-gcc.

MBeijer avatar MBeijer commented on August 28, 2024

Thanks for that! :)

Bebbo:
One request I have is that I'd like it if the SDL includes ends up in /opt/m68k-amigaos/include/ SDL/ rather than /opt/m68k-amigaos/m68k-amigaos/include/ so system specific includes doesn't get mixed in with ported libs and such.

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

now the SDL and GL folders are copied.

from amiga-gcc.

MBeijer avatar MBeijer commented on August 28, 2024

As a side-note, I intend to apply the fixes from the libSDL12 repo to the AmigaPorts/SDL repo. When it's time to switch I'll let you know. Until then libSDL12 serves its purpose.

from amiga-gcc.

MBeijer avatar MBeijer commented on August 28, 2024

Awesome, thank you! :) 👍

from amiga-gcc.

MBeijer avatar MBeijer commented on August 28, 2024

Make-script fails at libSDL12:

make[2]: Leaving directory '/home/marlon/tmp/Programming/Amiga/Tools/amiga-gcc'
make[1]: Leaving directory '/home/marlon/tmp/Programming/Amiga/Tools/amiga-gcc'
cd build/libSDL12 && "CFLAGS=-Os -g -fomit-frame-pointer" make -f Makefile.bax PREFX=/opt/m68k-amigaos PREF=/opt/m68k-amigaos
/bin/bash: CFLAGS=-Os -g -fomit-frame-pointer: command not found
make: *** [Makefile:623: build/libSDL12/_done] Error 127

from amiga-gcc.

MBeijer avatar MBeijer commented on August 28, 2024

Simply moving the first " from "CFLAGS= to CFLAGS=" fixes this.

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

... happens :-)

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

what's left to do here?

from amiga-gcc.

MBeijer avatar MBeijer commented on August 28, 2024

Nothing until we're/I'm done merging the libSDL12 repo into the AmigaPorts/SDL/SDL-1.2 branch, which is a lot of manual work!

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

reopened if necessary

from amiga-gcc.

arczi84 avatar arczi84 commented on August 28, 2024

"Fire-0.3" demo from https://su2.info/demos/
displays only half of particles on the screen.
Tried various -O flags with same result.
Works on older gcc's.

from amiga-gcc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.