Rev 8182 | Rev 9758 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8181 | maxcodehac | 1 | CC = kos32-gcc |
2 | LD = kos32-ld |
||
3 | |||
4 | SDK_DIR = $(abspath ../..) |
||
5 | |||
8518 | maxcodehac | 6 | LDFLAGS = -static -nostdlib -T $(SDK_DIR)/sources/newlib/app.lds --image-base 0 |
8181 | maxcodehac | 7 | |
8182 | maxcodehac | 8 | CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -Wno-pointer-arith |
8181 | maxcodehac | 9 | |
10 | INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I $(SDK_DIR)/sources/libstdc++-v3/include |
||
11 | LIBPATH = -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib |
||
12 | |||
13 | SOURCES = hello.cpp \ |
||
14 | $(NULL) |
||
15 | |||
16 | OBJECTS = $(patsubst %.cpp, %.o, $(SOURCES)) |
||
17 | |||
18 | default: hello |
||
19 | |||
20 | hello: $(OBJECTS) Makefile |
||
8518 | maxcodehac | 21 | $(LD) $(LDFLAGS) $(LIBPATH) --subsystem console -o hello.kex $(OBJECTS) -lstdc++ -lsupc++ -lgcc -lc.dll |
8182 | maxcodehac | 22 | strip -s hello.kex -o hello.kex |
8181 | maxcodehac | 23 | objcopy hello.kex -O binary |
24 | rm *.o |
||
25 | |||
26 | %.o : %.cpp Makefile $(SOURCES) |
||
27 | $(CC) $(CFLAGS) $(INCLUDES) -o $@ $<> |