forked from KolibriOS/kolibrios
hello sample: update Makefiles
git-svn-id: svn://kolibrios.org@6866 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ddda916673
commit
f31b2b2efe
@ -3,12 +3,12 @@ LD = kos32-ld
|
|||||||
|
|
||||||
SDK_DIR:= $(abspath ../..)
|
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
|
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
|
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 \
|
SOURCES = hello.c \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
@ -18,9 +18,9 @@ OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
|
|||||||
|
|
||||||
default: hello
|
default: hello
|
||||||
|
|
||||||
hello: $(OBJECTS) Makefile
|
hello: $(OBJECTS) Makefile.shared
|
||||||
$(LD) $(LDFLAGS) $(LIBPATH) -o hello $(OBJECTS) -lgcc -lc.dll -lapp
|
$(LD) $(LDFLAGS) $(LIBPATH) -o hello $(OBJECTS) -lgcc -lc.dll
|
||||||
objcopy hello -O binary
|
objcopy hello -O binary
|
||||||
|
|
||||||
%.o : %.c Makefile $(SOURCES)
|
%.o : %.c Makefile.shared $(SOURCES)
|
||||||
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
|
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
|
||||||
|
@ -3,12 +3,12 @@ LD = kos32-ld
|
|||||||
|
|
||||||
SDK_DIR:= $(abspath ../..)
|
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
|
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
|
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 \
|
SOURCES = hello.c \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
@ -19,9 +19,8 @@ OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
|
|||||||
default: hello
|
default: hello
|
||||||
|
|
||||||
hello: $(OBJECTS) Makefile.static
|
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
|
objcopy hello -O binary
|
||||||
|
|
||||||
%.o : %.c Makefile.static $(SOURCES)
|
%.o : %.c Makefile.static $(SOURCES)
|
||||||
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
|
$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user