diff --git a/contrib/sdk/samples/hello/Makefile.shared b/contrib/sdk/samples/hello/Makefile.shared index 039feb557..397c6f6ca 100644 --- a/contrib/sdk/samples/hello/Makefile.shared +++ b/contrib/sdk/samples/hello/Makefile.shared @@ -3,12 +3,12 @@ LD = kos32-ld SDK_DIR:= $(abspath ../..) -LDFLAGS = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app.lds --image-base 0 +LDFLAGS = -static -S -Tapp-dynamic.lds --image-base 0 CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 INCLUDES= -I $(SDK_DIR)/sources/newlib/libc/include -LIBPATH:= -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib +LIBPATH:= -L $(SDK_DIR)/lib SOURCES = hello.c \ $(NULL) @@ -18,9 +18,9 @@ OBJECTS = $(patsubst %.c, %.o, $(SOURCES)) default: hello -hello: $(OBJECTS) Makefile - $(LD) $(LDFLAGS) $(LIBPATH) -o hello $(OBJECTS) -lgcc -lc.dll -lapp +hello: $(OBJECTS) Makefile.shared + $(LD) $(LDFLAGS) $(LIBPATH) -o hello $(OBJECTS) -lgcc -lc.dll objcopy hello -O binary -%.o : %.c Makefile $(SOURCES) +%.o : %.c Makefile.shared $(SOURCES) $(CC) $(CFLAGS) $(INCLUDES) -o $@ $< diff --git a/contrib/sdk/samples/hello/Makefile.static b/contrib/sdk/samples/hello/Makefile.static index 23a384df2..5cda48b47 100644 --- a/contrib/sdk/samples/hello/Makefile.static +++ b/contrib/sdk/samples/hello/Makefile.static @@ -3,12 +3,12 @@ LD = kos32-ld SDK_DIR:= $(abspath ../..) -LDFLAGS = -static -nostdlib -T $(SDK_DIR)/sources/newlib/static.lds +LDFLAGS = -static -Tapp-static.lds CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 INCLUDES= -I $(SDK_DIR)/sources/newlib/libc/include -LIBPATH:= -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib +LIBPATH:= -L $(SDK_DIR)/lib SOURCES = hello.c \ $(NULL) @@ -19,9 +19,8 @@ OBJECTS = $(patsubst %.c, %.o, $(SOURCES)) default: hello hello: $(OBJECTS) Makefile.static - $(LD) $(LDFLAGS) $(LIBPATH) -o hello $(OBJECTS) -lc -lgcc -lc + $(LD) $(LDFLAGS) $(LIBPATH) -Map hello.map -o hello $(OBJECTS) -lc -lgcc -lc objcopy hello -O binary %.o : %.c Makefile.static $(SOURCES) $(CC) $(CFLAGS) $(INCLUDES) -o $@ $< -