2016-06-30 18:20:45 +02:00
|
|
|
NAME=boardmsg
|
|
|
|
CC = kos32-gcc
|
|
|
|
LD = kos32-ld
|
|
|
|
|
|
|
|
SDK_DIR:= $(abspath ../../../sdk)
|
|
|
|
CLAYER:= $(abspath ../../)
|
|
|
|
|
2020-10-30 18:41:58 +01:00
|
|
|
LDFLAGS = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app-dynamic.lds \
|
2016-09-27 11:47:30 +02:00
|
|
|
--image-base 0 -lgcc -ldll -lc.dll
|
2016-06-30 18:20:45 +02:00
|
|
|
|
2021-02-06 00:27:15 +01:00
|
|
|
CFLAGS = -g -U_Win32 -U_WIN32 -U__MINGW32__ -std=c99 -mno-ms-bitfields
|
2016-06-30 18:20:45 +02:00
|
|
|
|
|
|
|
INCLUDES= -I. -I$(SDK_DIR)/sources/newlib/libc/include -I$(CLAYER)/INCLUDE
|
2020-10-31 14:44:29 +01:00
|
|
|
LIBPATH:= -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib
|
2016-06-30 18:20:45 +02:00
|
|
|
|
|
|
|
OBJPATH = $(CLAYER)/OBJ
|
|
|
|
|
2016-09-08 20:54:17 +02:00
|
|
|
SOURCES = boardmsg.c option_menu.c
|
2016-06-30 18:20:45 +02:00
|
|
|
|
|
|
|
OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
|
|
|
|
|
2016-10-17 00:29:26 +02:00
|
|
|
all: boardmsg option_menu scroll_progress dbutton_files editor_tree_msgbox
|
|
|
|
|
|
|
|
editor_tree_msgbox: editor_tree_msgbox.o
|
|
|
|
$(LD) $(LIBPATH) --subsystem windows -o $@ $^ $(OBJPATH)/loadboxlib.obj $(OBJPATH)/loadlibimg.obj $(OBJPATH)/loadmsgbox.obj $(LDFLAGS) -Map=editor_tree_msgbox.map
|
|
|
|
kos32-objcopy $@ -O binary
|
2016-06-30 18:20:45 +02:00
|
|
|
|
2016-09-08 20:54:17 +02:00
|
|
|
scroll_progress: scroll_progress.o
|
|
|
|
$(LD) $(LIBPATH) --subsystem windows -o $@ $^ $(OBJPATH)/loadboxlib.obj $(LDFLAGS)
|
|
|
|
kos32-objcopy $@ -O binary
|
|
|
|
|
|
|
|
|
|
|
|
option_menu: option_menu.o
|
|
|
|
$(LD) $(LIBPATH) --subsystem native -o $@ $^ $(OBJPATH)/loadboxlib.obj $(LDFLAGS)
|
|
|
|
kos32-objcopy $@ -O binary
|
|
|
|
|
|
|
|
boardmsg: boardmsg.o
|
2016-10-20 19:13:23 +02:00
|
|
|
$(LD) $(LIBPATH) --subsystem native -o $@ $^ $(OBJPATH)/loadboxlib.obj $(LDFLAGS) -Map=boardmsg.map
|
|
|
|
# strip $@
|
2016-06-30 18:20:45 +02:00
|
|
|
kos32-objcopy $@ -O binary
|
|
|
|
|
2016-09-19 13:26:23 +02:00
|
|
|
dbutton_files: dbutton_files.o
|
2016-10-17 00:29:26 +02:00
|
|
|
$(LD) $(LIBPATH) --subsystem native -o $@ $^ $(OBJPATH)/loadboxlib.obj $(OBJPATH)/loadproclib.obj $(OBJPATH)/loadlibimg.obj $(LDFLAGS)
|
2016-09-19 13:26:23 +02:00
|
|
|
kos32-objcopy $@ -O binary
|
|
|
|
|
2016-06-30 18:20:45 +02:00
|
|
|
%.o : %.c Makefile
|
|
|
|
$(CC) -c $(INCLUDES) $(CFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
2021-02-06 00:27:15 +01:00
|
|
|
-rm -f *.o boardmsg boardmsg.map dbutton_files editor_tree_msgbox editor_tree_msgbox.map option_menu scroll_progress
|