Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
8335 maxcodehac 1
CC = kos32-gcc
2
LD = kos32-ld
3
 
4
SDK_DIR = $(abspath ../../../contrib/sdk)
5
 
6
CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32
7
LDFLAGS = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app.lds --image-base 0
8
 
9
INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include
10
LIBPATH = -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib
11
 
12
 
13
# Only selected
14
SRC = convert.c word.c error.c main.c hash.c \
15
	parse.c malloc.c attr.c util.c \
16
	output.c html.c text.c vt.c ps.c latex.c wpml.c
17
 
18
# All .c files
19
# SRC = $(notdir $(wildcard *.c))
20
 
21
OBJECTS = $(patsubst %.c, %.o, $(SRC))
22
 
23
default: $(patsubst %.c,%.o,$(SRC))
24
	kos32-ld $(LDFLAGS) $(LIBPATH) --subsystem console -o unrtf $(OBJECTS) -lgcc -lc.dll
25
	objcopy unrtf -O binary
26
 
27
%.o : %.c Makefile $(SRC)
28
	$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
29
 
30
clean:
31
	rm *.o