Building libs based on C source?

Other misc things
Post Reply
sgjava
Member
Posts: 25
Joined: Thu Feb 22, 2024 9:25 pm

Building libs based on C source?

Post by sgjava »

All the info I can find on building libs is with asm source. Is there a way to do this with C source?
stefano
Well known member
Posts: 2328
Joined: Mon Jul 16, 2007 7:39 pm

Re: Building libs based on C source?

Post by stefano »

https://github.com/z88dk/z88dk/tree/mas ... /c128/c128

..the source alone doesn't change much, but you need to export the objects properly in the header file.

https://github.com/z88dk/z88dk/tree/master/include/c128

See the Makefiles for the compiler/linker options
sgjava
Member
Posts: 25
Joined: Thu Feb 22, 2024 9:25 pm

Re: Building libs based on C source?

Post by sgjava »

Funny you reference my old code :) I'm porting C3L over to z88dk. I did look there, maybe I missed the actual make steps.
sgjava
Member
Posts: 25
Joined: Thu Feb 22, 2024 9:25 pm

Re: Building libs based on C source?

Post by sgjava »

OK, I think this is what you are talking about?

Code: Select all

TARGET=c128 TYPE=z80 $(LIBLINKER) -DFORc128 -x$(OUTPUT_DIRECTORY)/c128cpm @$(TARGET_DIRECTORY)/c128/c128_cpm.lst
sgjava
Member
Posts: 25
Joined: Thu Feb 22, 2024 9:25 pm

Re: Building libs based on C source?

Post by sgjava »

OK, got it:

Code: Select all

z88dk-z80asm -d -xc3l @c3l.lst
stefano
Well known member
Posts: 2328
Joined: Mon Jul 16, 2007 7:39 pm

Re: Building libs based on C source?

Post by stefano »

Steve! I'm so glad to see you're active on z88dk!
Post Reply