2019-06-28 19:05:56 +02:00
|
|
|
default:
|
|
|
|
@echo specify the target:
|
2021-06-17 20:49:53 +02:00
|
|
|
@echo - freebsd-i386
|
|
|
|
@echo - freebsd-amd64
|
|
|
|
@echo - linux-i386
|
|
|
|
@echo - macos-amd64
|
|
|
|
@echo - openbsd-amd64
|
2019-06-28 19:05:56 +02:00
|
|
|
|
|
|
|
common:
|
|
|
|
mkdir -p bin
|
2019-12-20 20:04:13 +01:00
|
|
|
cp ../../ngaImage nativeImage
|
|
|
|
../../bin/retro-embedimage nativeImage >image.c
|
2019-06-28 19:05:56 +02:00
|
|
|
rm nativeImage
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm *.o
|
|
|
|
|
2021-06-17 20:49:53 +02:00
|
|
|
bsd-i386:
|
|
|
|
nasm -f elf bsd-i386.s
|
|
|
|
|
|
|
|
bsd-amd64:
|
|
|
|
nasm -f elf64 bsd-amd64.s
|
|
|
|
|
|
|
|
freebsd-i386: common bsd-i386
|
2019-06-28 19:05:56 +02:00
|
|
|
cc -m32 -c retro.c
|
2021-06-17 20:49:53 +02:00
|
|
|
ld -nostdlib -m elf_i386_fbsd bsd-i386.o retro.o -o bin/retro
|
2019-06-28 19:05:56 +02:00
|
|
|
|
2021-06-17 20:49:53 +02:00
|
|
|
freebsd-amd64: common bsd-amd64
|
2019-06-28 19:05:56 +02:00
|
|
|
cc -m64 -c retro.c
|
2021-06-17 20:49:53 +02:00
|
|
|
ld -nostdlib -m elf_x86_64_fbsd bsd-amd64.o retro.o -o bin/retro
|
2019-06-28 19:05:56 +02:00
|
|
|
|
2021-06-19 07:47:10 +02:00
|
|
|
openbsd-amd64: common
|
2019-06-28 19:05:56 +02:00
|
|
|
cc -m64 -c retro.c
|
2021-06-17 20:49:53 +02:00
|
|
|
as openbsd.s -o openbsd.o
|
2021-06-19 07:47:10 +02:00
|
|
|
ld -nostdlib -no-pie -m elf_x86_64 openbsd.o retro.o -o bin/retro
|
2021-06-17 20:49:53 +02:00
|
|
|
|
|
|
|
macos-amd64: common
|
|
|
|
cc -m64 -fno-pie -c retro.c
|
2019-06-28 19:05:56 +02:00
|
|
|
nasm -f macho64 macos.s
|
2021-06-17 20:49:53 +02:00
|
|
|
ld macos.o retro.o -o bin/retro
|
2019-06-28 19:05:56 +02:00
|
|
|
|
2021-06-17 20:49:53 +02:00
|
|
|
linux-i386: common
|
2019-06-28 19:05:56 +02:00
|
|
|
cc -m32 -c retro.c
|
|
|
|
nasm -f elf linux.s
|
2021-06-17 20:49:53 +02:00
|
|
|
ld -nostdlib linux.o retro.o -o bin/retro
|