2020-11-14 17:51:07 +01:00
|
|
|
CC = kos32-gcc
|
|
|
|
LD = kos32-ld
|
|
|
|
|
|
|
|
SDK_DIR = $(abspath ../../../../contrib/sdk)
|
|
|
|
LDFLAGS = -call_shared -nostdlib -T $(SDK_DIR)/sources/newlib/app-dynamic.lds --image-base 0
|
|
|
|
|
|
|
|
CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32
|
|
|
|
|
|
|
|
INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include
|
|
|
|
LIBPATH = -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib
|
|
|
|
|
2020-12-22 20:49:57 +01:00
|
|
|
ifndef LANG_
|
|
|
|
LANG_ = lang_en
|
2020-11-14 17:51:07 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
default: backy
|
|
|
|
|
|
|
|
backy: $(OBJECTS) Makefile
|
2020-12-22 20:49:57 +01:00
|
|
|
$(CC) $(CFLAGS) $(INCLUDES) -D$(LANG_) -o Backy.o Backy.c
|
2020-11-14 17:51:07 +01:00
|
|
|
$(LD) $(LDFLAGS) $(LIBPATH) --subsystem console -o Backy Backy.o -lgcc -lc.dll
|
|
|
|
kos32-strip -s Backy -o Backy
|
|
|
|
objcopy Backy -O binary
|
|
|
|
rm Backy.o
|
|
|
|
clean:
|
|
|
|
rm Backy
|