hello sample: update Makefiles

git-svn-id: svn://kolibrios.org@6866 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2017-02-18 11:09:47 +00:00
parent ddda916673
commit f31b2b2efe
2 changed files with 8 additions and 9 deletions

View File

@ -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 $@ $<

View File

@ -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 $@ $<