Code Monkey home page Code Monkey logo

sgdk_nix's People

Contributors

drojaazu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sgdk_nix's Issues

Build of libmd_debug is broken

Hello, I tried to compile several libmd_debug, but the lib is broken. GCC makes an 8kb file, which is not normal and does not work in all cases.

I did not compare the source makefile from SGDK.

SGDK Libs

-rw-r--r-- 1 kentosama kentosama 313654 mars  23 13:42 libmd.a
-rw-r--r-- 1 kentosama kentosama      8 mars  23 13:42 libmd_debug.a
lrwxrwxrwx 1 kentosama kentosama     36 mars  23 13:15 ligcc.a -> /usr/lib/gcc/m68k-elf/6.3.0/libgcc.a

SGDK build

kentosama@teradrive:/media/storage/repo/teradrive/sgdk/sgdk_nix$ ./setup.sh 
SGDK for *nix - Initial Setup
Please specify SGDK directory: /media/storage/repo/teradrive/sgdk/source/SGDK-master
Please specify M68k toolchain prefix: m68k-elf-

Checking for necessary tools...
gcc ... found!
unzip ... found!
java ... found!
sjasmplus ... found!
m68k-elf-gcc ... found!
m68k-elf-objcopy ... found!
m68k-elf-nm ... found!
m68k-elf-ld ... found!

Updating project and library makefiles... done!

Building appack...
gcc -Wall -O2 -s -Ilib/elf64 -o out/appack example/appack.c lib/elf64/aplib.a
Copied out/appack to /media/storage/repo/teradrive/sgdk/source/SGDK-master/bin
Success!

Building xgmtool...
gcc -fexpensive-optimizations -Os -s -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/inc -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/out/xgmtool /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/samplebank.c /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/xgmcom.c /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/psg.c /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/gd3.c /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/xgm.c /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/vgm.c /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/util.c /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/vgmcom.c /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/ym2612.c /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/xgccom.c /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/xgmsmp.c /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/xgmtool.c /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/xgc.c -lm
/media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/xgccom.c: In function ‘XGCCommand_createStateCommand’:
/media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/xgccom.c:217:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
         data[off++] = (int) curState->element;
                       ^
/media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/xgccom.c:219:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
         data[off++] = (int) curState->element;
                       ^
/media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/xgc.c: In function ‘XGC_getStateChange’:
/media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/xgc.c:554:51: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
                 result = insertAfterLList(result, (void*) addr);
                                                   ^
/media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/xgc.c:555:51: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
                 result = insertAfterLList(result, (void*) YM2612_get(current, port, reg));
                                                   ^
/media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/src/xgc.c:571:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
         result = insertAfterLList(result, (void*) YM2612_get(current, 0, 0x2B));
                                           ^
Copied /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/xgmtool/out/xgmtool to /media/storage/repo/teradrive/sgdk/source/SGDK-master/bin
Success!

Building bintos...
gcc -Wall -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/bintos/out/bintos /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/bintos/src/bintos.c
/media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/bintos/src/bintos.c: In function ‘main’:
/media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/bintos/src/bintos.c:47:11: warning: variable ‘ext’ set but not used [-Wunused-but-set-variable]
     char *ext;
           ^~~
Copied /media/storage/repo/teradrive/sgdk/source/SGDK-master/tools/bintos/out/bintos to /media/storage/repo/teradrive/sgdk/source/SGDK-master/bin
Success!

Building SGDK library...
java -jar /media/storage/repo/teradrive/sgdk/source/SGDK-master/bin/rescomp.jar /media/storage/repo/teradrive/sgdk/source/SGDK-master/res/libres.res /media/storage/repo/teradrive/sgdk/source/SGDK-master/res/libres.s
ResComp 2.64 - SGDK Resource Compiler - Copyright 2020 (Stephane Dallongeville)

Resource: BITMAP sgdk_logo "image/sgdk_logo.png" -1
--> executing plugin BITMAP...

Resource: TILESET font_default "image/font_default.png" -1
--> executing plugin TILESET...

Resource: PALETTE font_pal_default "image/font_default.png"
--> executing plugin PALETTE...

Resource: BIN stop_xgm "sound/stop_xgm.bin" 2 2 0 NONE FALSE
--> executing plugin BIN...
Executing /media/storage/repo/teradrive/sgdk/source/SGDK-master/bin/appack c pack.in pack.out -s 
appack, aPLib compression library example
Copyright 1998-2014 Joergen Ibsen (www.ibsensoftware.com)

  Syntax:

    Compress    :  appack c <file> <packed_file>
    Decompress  :  appack d <packed_file> <depacked_file>

Executing java -jar /media/storage/repo/teradrive/sgdk/source/SGDK-master/bin/lz4w.jar p pack.in pack.out -s 
Packed with LZ4W, 'font_default_data' final size = 694 (23% - origin size = 3072)
Executing /media/storage/repo/teradrive/sgdk/source/SGDK-master/bin/appack c pack.in pack.out -s 
appack, aPLib compression library example
Copyright 1998-2014 Joergen Ibsen (www.ibsensoftware.com)

  Syntax:

    Compress    :  appack c <file> <packed_file>
    Decompress  :  appack d <packed_file> <depacked_file>

Executing java -jar /media/storage/repo/teradrive/sgdk/source/SGDK-master/bin/lz4w.jar p [email protected] pack.out -s 
Packed with LZ4W, 'sgdk_logo_data' final size = 1412 (69% - origin size = 2048)
/media/storage/repo/teradrive/sgdk/source/SGDK-master/res/libres.res summary:
-------------
Binary data: 2342 bytes
  Unpacked: 236 bytes
  Packed: 2106 bytes (41% - origin size: 5120 bytes)
Misc metadata (bitmap, image, tilemap, tileset, palette..): 34 bytes
Total: 2376 bytes (2 KB)
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/res/libres.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/res/libres.o
sjasmplus -i/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -i/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc --raw=/media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv1.o80 /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv1.s80
SjASMPlus Z80 Cross-Assembler v1.14.5 (https://github.com/z00m128/sjasmplus)
Pass 1 complete (0 errors)
Pass 2 complete (0 errors)
Pass 3 complete
Errors: 0, warnings: 0, compiled: 3984 lines, work time: 0.030 seconds
/media/storage/repo/teradrive/sgdk/source/SGDK-master/bin/bintos /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv1.o80
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv1.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv1.o
sjasmplus -i/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -i/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc --raw=/media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv2.o80 /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv2.s80
SjASMPlus Z80 Cross-Assembler v1.14.5 (https://github.com/z00m128/sjasmplus)
Pass 1 complete (0 errors)
Pass 2 complete (0 errors)
Pass 3 complete
Errors: 0, warnings: 0, compiled: 4345 lines, work time: 0.025 seconds
/media/storage/repo/teradrive/sgdk/source/SGDK-master/bin/bintos /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv2.o80
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv2.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv2.o
sjasmplus -i/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -i/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc --raw=/media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv3.o80 /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv3.s80
SjASMPlus Z80 Cross-Assembler v1.14.5 (https://github.com/z00m128/sjasmplus)
Pass 1 complete (0 errors)
Pass 2 complete (0 errors)
Pass 3 complete
Errors: 0, warnings: 0, compiled: 3771 lines, work time: 0.024 seconds
/media/storage/repo/teradrive/sgdk/source/SGDK-master/bin/bintos /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv3.o80
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv3.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv3.o
sjasmplus -i/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -i/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc --raw=/media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_xgm.o80 /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_xgm.s80
SjASMPlus Z80 Cross-Assembler v1.14.5 (https://github.com/z00m128/sjasmplus)
Pass 1 complete (0 errors)
Pass 2 complete (0 errors)
Pass 3 complete
Errors: 0, warnings: 0, compiled: 7028 lines, work time: 0.055 seconds
/media/storage/repo/teradrive/sgdk/source/SGDK-master/bin/bintos /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_xgm.o80
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_xgm.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_xgm.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/dma_a.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/dma_a.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/smp_null_pcm.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/smp_null_pcm.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/sys_a.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/sys_a.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/kdebug.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/kdebug.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/maths3D_a.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/maths3D_a.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vdp_tile_a.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vdp_tile_a.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/sram_a.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/sram_a.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/memory_a.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/memory_a.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/smp_null.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/smp_null.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/bmp_a.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/bmp_a.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tools_a.s -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tools_a.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tab_vol.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tab_vol.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/maths.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/maths.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/sprite_eng.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/sprite_eng.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/types.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/types.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/psg.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/psg.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vdp_dma.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vdp_dma.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vdp.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vdp.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tab_log2.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tab_log2.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/fat16.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/fat16.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vdp_pal.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vdp_pal.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/xgm.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/xgm.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/sram.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/sram.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vdp_tile.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vdp_tile.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/maths3D.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/maths3D.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/joy.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/joy.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/bmp.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/bmp.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tab_log10.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tab_log10.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/sound.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/sound.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/ym2612.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/ym2612.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tools.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tools.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/memory.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/memory.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/dma.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/dma.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tab_cnv.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tab_cnv.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/sys.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/sys.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/everdrive.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/everdrive.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tab_sin.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tab_sin.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vdp_bg.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vdp_bg.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/mapper.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/mapper.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vram.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vram.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/string.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/string.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/pal.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/pal.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/timer.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/timer.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vdp_spr.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/vdp_spr.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tab_sqrt.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/tab_sqrt.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/inc -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/src -I/media/storage/repo/teradrive/sgdk/source/SGDK-master/res -O1 -ggdb -DDEBUG=1 -c /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_ctrl.c -o /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_ctrl.o
ar rs /media/storage/repo/teradrive/sgdk/source/SGDK-master/lib/libmd_debug.a
ar: création de /media/storage/repo/teradrive/sgdk/source/SGDK-master/lib/libmd_debug.a
rm /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_xgm.s /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv2.o80 /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv3.s /media/storage/repo/teradrive/sgdk/source/SGDK-master/res/libres.s /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_xgm.o80 /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv1.s /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv3.o80 /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv2.s /media/storage/repo/teradrive/sgdk/source/SGDK-master/src/z80_drv1.o80
Success!

Sample build

kentosama@teradrive:~/Workspace/Projects/helloworld$ make clean
kentosama@teradrive:~/Workspace/Projects/helloworld$ make debug
-e Beginning debug project build...
m68k-elf-gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -I/usr/lib/sgdk/inc -I/usr/lib/sgdk/res -c src/boot/rom_head.c -o out/rom_head.o
m68k-elf-ld -T /usr/lib/sgdk/md.ld -nostdlib --oformat binary -o out/rom_head.bin out/rom_head.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -I/usr/lib/sgdk/inc -I/usr/lib/sgdk/res -c src/boot/sega.s -o out/sega.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -I/usr/lib/sgdk/inc -I/usr/lib/sgdk/res -O1 -ggdb -DDEBUG=1 -c src/main.c -o out/src/main.o
src/main.c:12:5: warning: first argument of 'main' should be 'int' [-Wmain]
 int main(u16 hard)
     ^~~~
src/main.c:12:5: warning: 'main' takes only zero or two arguments [-Wmain]
m68k-elf-gcc -m68000 -n -Wl,--build-id=none -T /usr/lib/sgdk/md.ld -nostdlib out/sega.o out/src/main.o /usr/lib/sgdk/lib/libmd_debug.a /usr/lib/sgdk/lib/libgcc.a -o out/rom.out
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `registersDump':
(.text.keepboot+0x266): undefined reference to `registerState'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x26c): undefined reference to `registerState'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x272): undefined reference to `registerState'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x278): undefined reference to `registerState'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x27e): undefined reference to `registerState'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o:(.text.keepboot+0x284): more undefined references to `registerState' follow
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `busAddressErrorDump':
(.text.keepboot+0x2ca): undefined reference to `ext1State'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x2d2): undefined reference to `addrState'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x2da): undefined reference to `ext2State'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x2e2): undefined reference to `srState'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x2ea): undefined reference to `pcState'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `exception4WDump':
(.text.keepboot+0x2f6): undefined reference to `srState'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x2fe): undefined reference to `pcState'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x306): undefined reference to `ext1State'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `exceptionDump':
(.text.keepboot+0x312): undefined reference to `srState'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x31a): undefined reference to `pcState'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `WrongVersion':
(.text.keepboot+0x240): undefined reference to `_start_entry'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `SkipSetup':
(.text.keepboot+0x246): undefined reference to `_reset_entry'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Bus_Error':
(.text.keepboot+0x32c): undefined reference to `busErrorCB'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Address_Error':
(.text.keepboot+0x342): undefined reference to `addressErrorCB'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Illegal_Instruction':
(.text.keepboot+0x358): undefined reference to `illegalInstCB'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Zero_Divide':
(.text.keepboot+0x36e): undefined reference to `zeroDivideCB'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Chk_Instruction':
(.text.keepboot+0x384): undefined reference to `chkInstCB'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Trapv_Instruction':
(.text.keepboot+0x39a): undefined reference to `trapvInstCB'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Privilege_Violation':
(.text.keepboot+0x3b0): undefined reference to `privilegeViolationCB'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Trace':
(.text.keepboot+0x3c6): undefined reference to `traceCB'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Line_1010_Emulation':
(.text.keepboot+0x3dc): undefined reference to `line1x1xCB'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Error_Exception':
(.text.keepboot+0x3f2): undefined reference to `errorExceptionCB'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_INT':
(.text.keepboot+0x404): undefined reference to `intCB'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_EXTINT':
(.text.keepboot+0x416): undefined reference to `internalExtIntCB'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_HINT':
(.text.keepboot+0x428): undefined reference to `internalHIntCB'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_VINT':
(.text.keepboot+0x43a): undefined reference to `internalVIntCB'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/src/main.o: in function `main':
/home/kentosama/Workspace/Projects/helloworld/src/main.c:14: undefined reference to `SYS_disableInts'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: /home/kentosama/Workspace/Projects/helloworld/src/main.c:15: undefined reference to `VDP_setScreenWidth320'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: /home/kentosama/Workspace/Projects/helloworld/src/main.c:16: undefined reference to `VDP_setScreenHeight224'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: /home/kentosama/Workspace/Projects/helloworld/src/main.c:17: undefined reference to `VDP_setPlanSize'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: /home/kentosama/Workspace/Projects/helloworld/src/main.c:18: undefined reference to `palette_grey'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: /home/kentosama/Workspace/Projects/helloworld/src/main.c:18: undefined reference to `VDP_setPalette'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: /home/kentosama/Workspace/Projects/helloworld/src/main.c:19: undefined reference to `palette_black'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: /home/kentosama/Workspace/Projects/helloworld/src/main.c:19: undefined reference to `VDP_setPaletteColors'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: /home/kentosama/Workspace/Projects/helloworld/src/main.c:20: undefined reference to `VDP_setTextPalette'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: /home/kentosama/Workspace/Projects/helloworld/src/main.c:21: undefined reference to `VDP_drawText'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: /home/kentosama/Workspace/Projects/helloworld/src/main.c:22: undefined reference to `SYS_enableInts'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: /home/kentosama/Workspace/Projects/helloworld/src/main.c:24: undefined reference to `SPR_init'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: /home/kentosama/Workspace/Projects/helloworld/src/main.c:28: undefined reference to `SPR_update'
/usr/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: /home/kentosama/Workspace/Projects/helloworld/src/main.c:29: undefined reference to `VDP_waitVSync'
collect2: error: ld returned 1 exit status
make: *** [Makefile:161: out/rom.out] Error 1

Build failed on Ubuntu 20.04 new SGDK

I'm getting this compilation error on Ubuntu 20.04 with the most recent SGDK (tried 1.9, 2.0 and the current from master). I would appreciate any help

/opt/sgdk/bin/bintos /opt/sgdk/src/z80_drv0.o80
m68k-linux-gnu-gcc -x assembler-with-cpp -m68000 -Wall -Wextra -Wno-shift-negative-value -fno-builtin -I/opt/sgdk/inc -I/opt/sgdk/src -I/opt/sgdk/res -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c /opt/sgdk/src/z80_drv0.s -o /opt/sgdk/src/z80_drv0.o
m68k-linux-gnu-gcc -x assembler-with-cpp -m68000 -Wall -Wextra -Wno-shift-negative-value -fno-builtin -I/opt/sgdk/inc -I/opt/sgdk/src -I/opt/sgdk/res -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c /opt/sgdk/src/smp_null_pcm.s -o /opt/sgdk/src/smp_null_pcm.o
m68k-linux-gnu-gcc -x assembler-with-cpp -m68000 -Wall -Wextra -Wno-shift-negative-value -fno-builtin -I/opt/sgdk/inc -I/opt/sgdk/src -I/opt/sgdk/res -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c /opt/sgdk/src/smp_null.s -o /opt/sgdk/src/smp_null.o
m68k-linux-gnu-gcc -x assembler-with-cpp -m68000 -Wall -Wextra -Wno-shift-negative-value -fno-builtin -I/opt/sgdk/inc -I/opt/sgdk/src -I/opt/sgdk/res -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -c /opt/sgdk/src/tools_a.s -o /opt/sgdk/src/tools_a.o
/opt/sgdk/src/tools_a.s: Assembler messages:
/opt/sgdk/src/tools_a.s:278: Error: operands mismatch -- statement 'movem.l a2-a4,-(sp)' ignored
/opt/sgdk/src/tools_a.s:280: Error: syntax error -- statement 'lea .jump_table(pc),a3' ignored
/opt/sgdk/src/tools_a.s:283: Error: operands mismatch -- statement 'moveq #0,d1' ignored
/opt/sgdk/src/tools_a.s:283: Error: operands mismatch -- statement 'moveq #0,d0' ignored
/opt/sgdk/src/tools_a.s:283: Warning: missing operand; zero assumed
/opt/sgdk/src/tools_a.s:283: Warning: missing operand; zero assumed
/opt/sgdk/src/tools_a.s:283: Error: operands mismatch -- statement 'add.w d0,d0' ignored
/opt/sgdk/src/tools_a.s:283: Error: operands mismatch -- statement 'add.w d0,d0' ignored
/opt/sgdk/src/tools_a.s:283: Error: syntax error -- statement 'move.l (a3,d0.w),a4' ignored
/opt/sgdk/src/tools_a.s:306: Warning: missing operand; zero assumed
/opt/sgdk/src/tools_a.s:306: Warning: missing operand; zero assumed
/opt/sgdk/src/tools_a.s:306: Warning: missing operand; zero assumed
/opt/sgdk/src/tools_a.s:306: Warning: missing operand; zero assumed
/opt/sgdk/src/tools_a.s:306: Warning: missing operand; zero assumed

I've got A LOT of this warnings and errors, here's the bottom of the output:

/opt/sgdk/src/tools_a.s:726: Warning: missing operand; zero assumed
/opt/sgdk/src/tools_a.s:726: Warning: missing operand; zero assumed
/opt/sgdk/src/tools_a.s:726: Error: operands mismatch -- statement 'moveq #0,d1' ignored
/opt/sgdk/src/tools_a.s:726: Error: operands mismatch -- statement 'moveq #0,d0' ignored
/opt/sgdk/src/tools_a.s:726: Warning: missing operand; zero assumed
/opt/sgdk/src/tools_a.s:726: Warning: missing operand; zero assumed
/opt/sgdk/src/tools_a.s:726: Error: operands mismatch -- statement 'add.w d0,d0' ignored
/opt/sgdk/src/tools_a.s:726: Error: operands mismatch -- statement 'add.w d0,d0' ignored
/opt/sgdk/src/tools_a.s:726: Error: syntax error -- statement 'move.l (a3,d0.w),a4' ignored
/opt/sgdk/src/tools_a.s:729: Warning: missing operand; zero assumed
/opt/sgdk/src/tools_a.s:731: Warning: missing operand; zero assumed
/opt/sgdk/src/tools_a.s:734: Error: syntax error -- statement 'sub.l 20(sp),d0' ignored
/opt/sgdk/src/tools_a.s:736: Warning: missing operand; zero assumed
/opt/sgdk/src/tools_a.s:736: Error: operands mismatch -- statement 'movem.l (sp)+,a2-a4' ignored
/opt/sgdk/src/tools_a.s:343: Error: value 160 out of range
/opt/sgdk/src/tools_a.s:343: Error: value of 160 too large for field of 1 byte at 6367
make: *** [makefile_lib:111: /opt/sgdk/src/tools_a.o] Error 1

build failing on Ubuntu 20.04

Hello,

I'm running into this issue with SGDK 1.51 on Ubuntu 20.04. It's stopping at this part with an error. Any help would be greatly appreciated!

m68k-linux-gnu-gcc -m68000 -n -T /home/sirskid/Dev/SGDK/md.ld -nostdlib out/sega.o out/res/sprite.o out/res/sound.o out/res/gfx.o out/src/main.o /home/sirskid/Dev/SGDK/lib/libmd.a /home/sirskid/Dev/SGDK/lib/libgcc.a -o out/rom.out -Wl,--gc-sections
/usr/lib/gcc-cross/m68k-linux-gnu/9/../../../../m68k-linux-gnu/bin/ld: error: no memory region specified for loadable section `.note.gnu.build-id'
collect2: error: ld returned 1 exit status
make: *** [makefile:183: out/rom.out] Error 1
rm res/sound.rs res/gfx.rs res/sprite.rs

Makefile not work with the last SGDK

Hi! A lot of things have been changed in SGDK and the makefile. I tried to adapt the Makefile that came with SGDK NIX, but I failed to compile a project. For now, here are the compilation errors:

Beginning release project build...
m68k-elf-gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -I/opt/toolchains/genesis/sgdk2/inc -I/opt/toolchains/genesis/sgdk2/res -c src/boot/rom_head.c -o out/rom_head.o
m68k-elf-ld -T /opt/toolchains/genesis/sgdk2/md.ld -nostdlib --oformat binary -o out/rom_head.bin out/rom_head.o
m68k-elf-gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -I/opt/toolchains/genesis/sgdk2/inc -I/opt/toolchains/genesis/sgdk2/res -c src/boot/sega.s -o out/sega.o
m68k-elf-gcc -MMD -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -I/opt/toolchains/genesis/sgdk2/inc -I/opt/toolchains/genesis/sgdk2/res -O3 -fuse-linker-plugin -fno-web -fno-gcse -fomit-frame-pointer -fno-unit-at-a-time -flto -c src/main.c -o out/src/main.o
src/main.c:12:5: warning: first argument of 'main' should be 'int' [-Wmain]
 int main(u16 hard)
     ^~~~
src/main.c:12:5: warning: 'main' takes only zero or two arguments [-Wmain]
m68k-elf-gcc -m68000 -n -Wl,--build-id=none -T /opt/toolchains/genesis/sgdk2/md.ld -nostdlib out/sega.o out/src/main.o /opt/toolchains/genesis/sgdk2/lib/libmd.a /opt/toolchains/genesis/sgdk2/lib/libgcc.a -o out/rom.out
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `registersDump':
(.text.keepboot+0x266): undefined reference to `registerState'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x26c): undefined reference to `registerState'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x272): undefined reference to `registerState'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x278): undefined reference to `registerState'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x27e): undefined reference to `registerState'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o:(.text.keepboot+0x284): more undefined references to `registerState' follow
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `busAddressErrorDump':
(.text.keepboot+0x2ca): undefined reference to `ext1State'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x2d2): undefined reference to `addrState'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x2da): undefined reference to `ext2State'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x2e2): undefined reference to `srState'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x2ea): undefined reference to `pcState'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `exception4WDump':
(.text.keepboot+0x2f6): undefined reference to `srState'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x2fe): undefined reference to `pcState'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x306): undefined reference to `ext1State'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `exceptionDump':
(.text.keepboot+0x312): undefined reference to `srState'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: (.text.keepboot+0x31a): undefined reference to `pcState'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `WrongVersion':
(.text.keepboot+0x240): undefined reference to `_start_entry'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `SkipSetup':
(.text.keepboot+0x246): undefined reference to `_reset_entry'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Bus_Error':
(.text.keepboot+0x32c): undefined reference to `busErrorCB'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Address_Error':
(.text.keepboot+0x342): undefined reference to `addressErrorCB'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Illegal_Instruction':
(.text.keepboot+0x358): undefined reference to `illegalInstCB'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Zero_Divide':
(.text.keepboot+0x36e): undefined reference to `zeroDivideCB'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Chk_Instruction':
(.text.keepboot+0x384): undefined reference to `chkInstCB'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Trapv_Instruction':
(.text.keepboot+0x39a): undefined reference to `trapvInstCB'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Privilege_Violation':
(.text.keepboot+0x3b0): undefined reference to `privilegeViolationCB'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Trace':
(.text.keepboot+0x3c6): undefined reference to `traceCB'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Line_1010_Emulation':
(.text.keepboot+0x3dc): undefined reference to `line1x1xCB'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_Error_Exception':
(.text.keepboot+0x3f2): undefined reference to `errorExceptionCB'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_INT':
(.text.keepboot+0x404): undefined reference to `intCB'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_EXTINT':
(.text.keepboot+0x416): undefined reference to `internalExtIntCB'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_HINT':
(.text.keepboot+0x428): undefined reference to `internalHIntCB'
/opt/toolchains/genesis/m68k-elf/bin/../lib/gcc/m68k-elf/6.3.0/../../../../m68k-elf/bin/ld: out/sega.o: in function `_VINT':
(.text.keepboot+0x43a): undefined reference to `internalVIntCB'
collect2: error: ld returned 1 exit status
make: *** [Makefile:163 : out/rom.out] Erreur 1

I modified the Makefile of the lib in this way based on the latest version of SGDK, it is surely wrong.

I modified the Makefile of the lib from the latest version of SGDK, but it is surely wrong.

Can you update the Makefile? Would be very appreciable 👍

assembler issue with sega.s

m68k-elf-gcc -m68000 -Wall -Wextra -Wno-shift-negative-value -fno-builtin -Iinc -Isrc -Ires -I/opt/sgdk/inc -I/opt/sgdk/res -c src/boot/sega.s -o out/sega.o
src/boot/sega.s: Assembler messages:
src/boot/sega.s:256: Error: invalid operands (*UND* and *UND* sections) for `+'
make: *** [makefile:187: out/sega.o] Error 1

here's line 256 of sega.s
lea (task_regs + UTSK_REGS_LEN), %a0

someone else had the same problem, it was due to an outdated makefile
Stephane-D/SGDK#284

m68k-elf-gcc-bootstrap makepkg key issue

==> Verifying source file signatures with gpg...
gcc-13.1.0.tar.xz ... FAILED (unknown public key 6C35B99309B5FA62)
mpfr-4.2.0.tar.xz ... FAILED (unknown public key 5831D11A0D4DB02A)
mpc-1.3.1.tar.gz ... FAILED (unknown public key F7D5C9BF765C61E3)
gmp-6.2.1.tar.xz ... FAILED (unknown public key F3599FF828C67298)

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.