2016-08-19 01:39:38 +02:00
|
|
|
NAME=rasterworks_example
|
|
|
|
CC = kos32-gcc
|
|
|
|
LD = kos32-ld
|
|
|
|
|
|
|
|
SDK_DIR:= $(abspath ../../../sdk)
|
|
|
|
CLAYER:= $(abspath ../../)
|
|
|
|
|
|
|
|
LDFLAGS = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app.lds \
|
2020-11-02 13:15:24 +01:00
|
|
|
--image-base 0 -lgcc -ldll -lc.dll
|
2016-08-19 01:39:38 +02:00
|
|
|
|
2021-02-06 00:27:15 +01:00
|
|
|
CFLAGS = -g -U_Win32 -U_WIN32 -U__MINGW32__ -std=c99
|
2016-08-19 01:39:38 +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-08-19 01:39:38 +02:00
|
|
|
|
|
|
|
OBJPATH = $(CLAYER)/OBJ
|
|
|
|
|
|
|
|
SOURCES = rasterworks_example.c
|
|
|
|
|
|
|
|
OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
|
|
|
|
|
|
|
|
all:$(NAME)
|
|
|
|
|
|
|
|
$(NAME): $(OBJECTS) Makefile
|
|
|
|
$(LD) $(LIBPATH) --subsystem native -o $@ $(OBJECTS) $(OBJPATH)/loadboxlib.obj $(OBJPATH)/loadrasterworks.obj $(OBJPATH)/loadbuf2d.obj $(LDFLAGS)
|
|
|
|
kos32-objcopy $@ -O binary
|
|
|
|
|
|
|
|
%.o : %.c Makefile
|
|
|
|
$(CC) -c $(INCLUDES) $(CFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
2021-02-06 00:27:15 +01:00
|
|
|
-rm -f *.o $(NAME)
|