Rev 9758 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9758 | Rev 9759 | ||
---|---|---|---|
1 | CC = kos32-gcc |
1 | CC = kos32-gcc |
2 | LD = kos32-ld |
2 | LD = kos32-ld |
3 | 3 | ||
- | 4 | CONTRIB_DIR = $(abspath ../../..) |
|
4 | SDK_DIR = $(abspath ../..) |
5 | SDK_DIR = $(CONTRIB_DIR)/sdk |
5 | 6 | ||
6 | CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -Wno-pointer-arith |
7 | CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -Wno-pointer-arith |
7 | LDFLAGS = -static -S -Tapp-dynamic.lds --image-base 0 |
8 | LDFLAGS = -static -S -Tapp-dynamic.lds --image-base 0 |
8 | 9 | ||
9 | INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I $(SDK_DIR)/sources/libstdc++-v3/include |
10 | INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I $(SDK_DIR)/sources/libstdc++-v3/include |
10 | LIBPATH = -L $(SDK_DIR)/lib |
11 | LIBPATH = -L $(SDK_DIR)/lib |
11 | 12 | ||
12 | SOURCES = hello.cpp |
13 | SOURCES = hello.cpp |
13 | OBJECTS = $(patsubst %.cpp, %.o, $(SOURCES)) |
14 | OBJECTS = $(patsubst %.cpp, %.o, $(SOURCES)) |
14 | 15 | ||
15 | default: hello |
16 | default: hello |
16 | 17 | ||
17 | hello: $(OBJECTS) Makefile |
18 | hello: $(OBJECTS) Makefile |
18 | $(LD) $(LDFLAGS) $(LIBPATH) --subsystem console -o hello $(OBJECTS) -lstdc++ -lsupc++ -lgcc -lc.dll |
19 | $(LD) $(LDFLAGS) $(LIBPATH) --subsystem console -o hello $(OBJECTS) -lstdc++ -lsupc++ -lgcc -lc.dll |
19 | strip -s hello -o hello |
20 | strip -s hello -o hello |
20 | objcopy hello -O binary |
21 | objcopy hello -O binary |
21 | 22 | ||
22 | %.o : %.cpp Makefile $(SOURCES) |
23 | %.o : %.cpp Makefile $(SOURCES) |
23 | $(CC) $(CFLAGS) $(INCLUDES) -o $@ $<> |
24 | $(CC) $(CFLAGS) $(INCLUDES) -o $@ $<> |