2016-06-30 18:20:45 +02:00
|
|
|
NAME=boardmsg
|
|
|
|
CC = kos32-gcc
|
|
|
|
LD = kos32-ld
|
|
|
|
|
|
|
|
SDK_DIR:= $(abspath ../../../sdk)
|
|
|
|
CLAYER:= $(abspath ../../)
|
|
|
|
|
|
|
|
LDFLAGS = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app.lds \
|
2016-07-21 22:05:36 +02:00
|
|
|
--image-base 0 -lgcc -ldll -lc.dll -lapp
|
2016-06-30 18:20:45 +02:00
|
|
|
|
|
|
|
CFLAGS = -g -U_Win32 -U_WIN32 -U__MINGW32__
|
|
|
|
|
|
|
|
INCLUDES= -I. -I$(SDK_DIR)/sources/newlib/libc/include -I$(CLAYER)/INCLUDE
|
|
|
|
LIBPATH:= -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib
|
|
|
|
|
|
|
|
OBJPATH = $(CLAYER)/OBJ
|
|
|
|
|
|
|
|
SOURCES = boardmsg.c
|
|
|
|
|
|
|
|
OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
|
|
|
|
|
|
|
|
all:$(NAME)
|
|
|
|
|
|
|
|
$(NAME): $(OBJECTS) Makefile
|
2016-07-21 22:05:36 +02:00
|
|
|
$(LD) $(LIBPATH) --subsystem native -o $@ $(OBJECTS) $(OBJPATH)/loadboxlib.obj $(LDFLAGS)
|
2016-06-30 18:20:45 +02:00
|
|
|
#-ldll -lc.dll -lapp -Map $(NAME).map
|
|
|
|
kos32-objcopy $@ -O binary
|
|
|
|
|
|
|
|
%.o : %.c Makefile
|
|
|
|
$(CC) -c $(INCLUDES) $(CFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f *.o
|