From 0b28f93f8efe4bcf01ee974106c22b399a881cb9 Mon Sep 17 00:00:00 2001 From: ashmew2 Date: Sun, 15 May 2016 06:41:52 +0000 Subject: [PATCH] Add makefile for boardmsg git-svn-id: svn://kolibrios.org@6430 a494cfbc-eb01-0410-851d-a64ba20cac60 --- contrib/C_Layer/libguic_kolibri/make_boardmsg | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 contrib/C_Layer/libguic_kolibri/make_boardmsg diff --git a/contrib/C_Layer/libguic_kolibri/make_boardmsg b/contrib/C_Layer/libguic_kolibri/make_boardmsg new file mode 100644 index 0000000000..ddd1340f78 --- /dev/null +++ b/contrib/C_Layer/libguic_kolibri/make_boardmsg @@ -0,0 +1,37 @@ +NAME=boardmsg +CC = kos32-gcc +LD = kos32-ld +FASM=fasm + +SDK_DIR:= $(abspath ../../sdk) + +LDFLAGS = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app.lds \ + --image-base 0 -lgcc /home/autobuild/tools/win32/lib/libdll.a\ + /home/autobuild/tools/win32/lib/libc.dll.a\ + /home/autobuild/tools/win32/lib/libapp.a + +CFLAGS = -g -U_Win32 -U_WIN32 -U__MINGW32__ + +INCLUDES= -I $(SDK_DIR)/sources/newlib/libc/include +LIBPATH:= -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib + + +SOURCES = loadboxlib.asm boardmsg.c + +OBJECTS = $(patsubst %.asm, %.obj, $(patsubst %.c, %.o, $(SOURCES))) + +all:$(NAME) + +$(NAME): $(OBJECTS) Makefile + $(LD) $(LIBPATH) -o $@ $(OBJECTS) $(LDFLAGS) +# -ldll -lapp -lc.dll -lgcc -Map $(NAME).map + kos32-objcopy $@ -O binary + +%.o : %.c Makefile + $(CC) -c $(INCLUDES) $(CFLAGS) -o $@ $< + +%.obj : %.asm Makefile + $(FASM) $< $@ + +clean: + -rm -f *.o *.obj