From f31b2b2efecafc04269e0c02cf0f4e5d6af55db0 Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Sat, 18 Feb 2017 11:09:47 +0000 Subject: [PATCH] hello sample: update Makefiles git-svn-id: svn://kolibrios.org@6866 a494cfbc-eb01-0410-851d-a64ba20cac60 --- contrib/sdk/samples/hello/Makefile.shared | 10 +++++----- contrib/sdk/samples/hello/Makefile.static | 7 +++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/contrib/sdk/samples/hello/Makefile.shared b/contrib/sdk/samples/hello/Makefile.shared index 039feb5571..397c6f6ca2 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 23a384df22..5cda48b478 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 $@ $< -