kolibrios/programs/develop/kosjs/Makefile
maxcodehack 91ae0dee0b kosjs: replace libmujs.a with sources; if argc = 0, see "usage"
git-svn-id: svn://kolibrios.org@8456 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-12-20 08:45:42 +00:00

24 lines
698 B
Makefile
Executable File

CC = kos32-gcc
LD = kos32-ld
OBJCOPY = objcopy
STRIP = strip
NAME = kosjs
SDK_DIR = ../../../contrib/sdk
LDFLAGS = -call_shared -nostdlib -T $(SDK_DIR)/sources/newlib/app-dynamic.lds --image-base 0
LIBPATH = -L$(SDK_DIR)/lib -L/home/autobuild/tools/win32/mingw32/lib -L libmujs
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 -I libmujs
all:
$(CC) $(CFLAGS) $(INCLUDES) kosjs.c import.c
$(LD) $(LDFLAGS) $(LIBPATH) --subsystem native -o $(NAME) $(NAME).o import.o -lmujs -lgcc -lc.dll
$(STRIP) -s $(NAME) -o $(NAME)
$(OBJCOPY) $(NAME) -O binary
clean:
rm -f $(NAME) *.o