ReservoirGods / GODLIB

Library for creating Atari ST software
34 stars 8 forks source link

Compiling with m68k-atari-mint-gcc under ubuntu #9

Open frranck opened 5 years ago

frranck commented 5 years ago

Hello, Is it possible to compile the lib under ubuntu with m68k-atari-mint-gcc? I'm renaming the includes but I'm getting and error because it can't find // lRes = (S32)getcwd( apPath, 256 ); If I comment it I'm getting some errors with FILE/FILE.C:908:25: error: invalid use of incomplete type 'struct File_StatToDTA(const stat, sGemDosDTA, const char*)::tm'

This is the makefile I'm using

CC = m68k-atari-mint-gcc
LD = m68k-atari-mint-gcc
AR = ar
SOURCES = ACHIEVE/ACH_MAIN.C ACHIEVE/ACH_SHOW.C ACHIEVE/ACH_SIGN.C ACHIEVE/ACH_UNLK.C \
    ASSERT/ASSERT.C \
    ASSET/ASSET.C ASSET/CONTEXT.C ASSET/PACKAGE.C ASSET/PKG_DIR.C ASSET/PKG_LNK.C ASSET/RELOCATE.C \
    AUDIO/AMIXER.C AUDIO/AUDIO.C AUDIO/REL_SPL.C AUDIO/SSD.C \
    BASE/BASE.C \
    BLITTER/BLITTER.C \
    CHUNKY/CHUNKY.C \
    CLI/CLI.C \
    CLOCK/CLOCK.C \
    COOKIE/COOKIE.C \
    CUTSCENE/CUT_SYS.C CUTSCENE/CUTPARSE.C CUTSCENE/CUTSCENE.C CUTSCENE/REL_CUT.C \
    DEBUG/DEBUG.C \
    DEBUGLOG/DEBUGLOG.C \
    DRIVE/DRIVE.C \
    ELFHASH/ELFHASH.C \
    ENCRYPT/ENCRYPT.C \
    EXCEPT/EXCEPT.C \
    FADE/FADE.C \
    FE/FED.C FE/FEDPARSE.C FE/R_FED.C FE/REL_FED.C \
    FILE/FILE.C \
    FONT/FONT.C FONT/REL_BFB.C \
    FONT8X8/FONT8X8.C FONT8X8/FONTDATA.C \
    GEMDOS/GEMDOS.C \
    GRAPHIC/GRAPHIC.C GRAPHIC/GRF_4.C GRAPHIC/GRF_16.C \
    GUI/GUI.C GUI/GUIDATA.C GUI/GUIEDIT.C GUI/GUIFS.C GUI/GUIPARSE.C GUI/R_GUI.C \
    HASHLIST/HASHLIST.C \
    HASHTREE/HASHTREE.C \
    IKBD/IKBD.C IKBD/IKBD_DI.C IKBD/IKBD_SDL.C \
    INPUT/INPUT.C \
    KERNEL/KERNEL.C \
    LINKFILE/LINKFILE.C \
    MAIN/GOD_MAIN.C \
    MEMORY/MEMORY.C \
    MFP/MFP.C \
    MUSIC/PINKNOTE.C MUSIC/SND.C \
    PACKER/ARI_DEC.C PACKER/ARI_ENC.C PACKER/BWT_DEC.C PACKER/BWT_ENC.C PACKER/GODPACK.C PACKER/LZ77_DEC.C PACKER/LZ77_ENC.C PACKER/LZ77BDEC.C PACKER/LZ77BENC.C PACKER/MTF_DEC.C PACKER/MTF_ENC.C PACKER/PACKER.C PACKER/RLE.C \
    PICTYPES/ART.C PICTYPES/CANVAS.C PICTYPES/CANVASIC.C PICTYPES/COLQUANT.C PICTYPES/DEGAS.C PICTYPES/GFX.C PICTYPES/GIF.C PICTYPES/GOD.C PICTYPES/GSM.C PICTYPES/NEO.C PICTYPES/OCTTREE.C PICTYPES/REL_GSM.C PICTYPES/TGA.C \
    PLATFORM/PLATFORM.C \
    PROFILER/PROFILE.C PROFILER/PROFILER.C \
    PROGRAM/PROGRAM.C \
    RANDOM/RANDOM.C \
    SCREEN/SCREEN.C \
    SCRNGRAB/SCRNGRAB.C \
    DUMMY.C \
    SPRITE/ASPRITE.C SPRITE/REL_ASB.C SPRITE/REL_BSB.C SPRITE/REL_RSB.C SPRITE/RSPRITE.C SPRITE/SPRITE.C \
    STRING/STRING.C STRING/STRLIST.C \
    SYSTEM/SYSTEM.C \
    TOKENISE/TOKENISE.C \
    VBL/VBL.C \
    VIDEO/VID_D3D.C VIDEO/VID_IMG.C VIDEO/VID_SDL.C VIDEO/VIDEL.C VIDEO/VIDEO.C \
    XBIOS/XBIOS.C

OBJECTS = $(SOURCES:.C=.GO)
CFLAGS = -fpermissive -Wall -static -g -D dSYSTEM_SDL=1 -D dGODLIB_COMPILER_GCC -I.. -I"C:\cygwin\lib\gcc\i686-pc-cygwin\4.3.2\include" -I"C:\cygwin\usr\include\mingw" -I"C:\Program Files\STEEM\hard_drv\TOOLS\CODE\PURE_C\INCLUDE" -I"C:\LIB_SDL\SDL-1.2.13\include"
LDFLAGS =
OUT = godlib.ga

$(OUT): $(OBJECTS)
    $(AR) r $(OUT) $(OBJECTS)

$(OBJECTS): %.GO: %.C
     $(CC) -c $(CFLAGS) $< -o $@

clean:
    rm -rf $(OBJECTS) $(OUT)
pink-rg commented 5 years ago

I've not tried compiling for that target, but I suspect you just need to #include in this case

frranck commented 5 years ago

@pink-rg thanks, I have another question: What is the eVIDEO_MODE_I8 mode? Is there a mode that would work like some PC mode 13h VGA, i.e. without planes? 1 byte for each pixel and a palette?