mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-13 02:17:07 +03:00
d2470c2ee6
git-svn-id: svn://kolibrios.org@8585 a494cfbc-eb01-0410-851d-a64ba20cac60
33 lines
941 B
Makefile
33 lines
941 B
Makefile
CC = kos32-gcc
|
|
LD = kos32-ld
|
|
|
|
SDK_DIR:= /home/programist/KOS_SVN/contrib/sdk
|
|
CLAYER:= /home/programist/KOS_SVN/contrib/C_Layer
|
|
|
|
LDFLAGS = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app-dynamic.lds \
|
|
--image-base 0 -lquirc -lgcc -ldll -lc.dll
|
|
|
|
# caution: without -mno-ms-bitfields below, pagefault occurs (why ? idk)
|
|
CFLAGS = -g -U_Win32 -U_WIN32 -U__MINGW32__ -std=c99 -mno-ms-bitfields
|
|
|
|
INCLUDES= -I. -Ilib -I$(SDK_DIR)/sources/newlib/libc/include -I$(CLAYER)/INCLUDE
|
|
LIBPATH:= -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib -L.
|
|
|
|
OBJPATH = $(CLAYER)/OBJ
|
|
|
|
SOURCES = qr_tool.c
|
|
|
|
OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
|
|
|
|
all: qr_tool
|
|
|
|
qr_tool: $(OBJECTS)
|
|
$(LD) $(LIBPATH) --subsystem windows -o $@ $^ $(OBJPATH)/loadboxlib.obj $(OBJPATH)/loadproclib.obj $(OBJPATH)/loadlibimg.obj $(LDFLAGS)
|
|
kos32-objcopy $@ -O binary
|
|
|
|
%.o : %.c Makefile
|
|
$(CC) -c $(INCLUDES) $(CFLAGS) -o $@ $<
|
|
|
|
clean:
|
|
rm -f *.o qr_tool
|