kolibrios/contrib/C_Layer/EXAMPLE/rasterworks/Makefile
Serhii Sakhno c6efe10624 add example for RasterWorks library
git-svn-id: svn://kolibrios.org@6492 a494cfbc-eb01-0410-851d-a64ba20cac60
2016-08-18 23:39:38 +00:00

33 lines
835 B
Makefile

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 \
--image-base 0 -lgcc -ldll -lc.dll -lapp
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 = 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:
-rm -f *.o