forked from KolibriOS/kolibrios
kpm: fix build
git-svn-id: svn://kolibrios.org@8517 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
46a3812550
commit
2184737e81
@ -1,64 +1,63 @@
|
||||
NAME = kpm
|
||||
|
||||
NAME= kpm
|
||||
|
||||
FASM= fasm.exe
|
||||
FASM = fasm
|
||||
CC = kos32-gcc
|
||||
AR = kos32-ar
|
||||
LD = kos32-ld
|
||||
CPP= kos32-g++
|
||||
CPP = kos32-g++
|
||||
STRIP = kos32-strip
|
||||
|
||||
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -Os -fomit-frame-pointer -fno-asynchronous-unwind-tables -fno-ident -fomit-frame-pointer -mno-ms-bitfields
|
||||
ARFLAG = crs
|
||||
|
||||
SDK_DIR:= $(abspath ../../sdk)
|
||||
LIB_DIR:= $(SDK_DIR)/lib
|
||||
SDK_DIR = $(abspath ../../sdk)
|
||||
LIB_DIR = $(SDK_DIR)/lib
|
||||
|
||||
INCLUDES= -I. -I$(SDK_DIR)/sources/newlib/libc/include
|
||||
INCLUDES+=-I$(SDK_DIR)/sources/freetype/include
|
||||
INCLUDES = -I. -I$(SDK_DIR)/sources/newlib/libc/include
|
||||
INCLUDES += -I$(SDK_DIR)/sources/freetype/include
|
||||
|
||||
#DEFINES= -DDEBUG=1 -D_7ZIP_PPMD_SUPPPORT
|
||||
|
||||
DEFINES= -DNDEBUG
|
||||
DEFINES = -DNDEBUG
|
||||
|
||||
LIBS:= -liberty -lsupc++ -lgcc_eh -lc.dll -lapp -lgcc -lc.dll
|
||||
LIBS = -liberty -lsupc++ -lgcc -lc.dll
|
||||
|
||||
LIBPATH:= -L$(LIB_DIR) -L/home/autobuild/tools/win32/mingw32/lib
|
||||
LIBPATH = -L$(LIB_DIR) -L/home/autobuild/tools/win32/mingw32/lib
|
||||
|
||||
LDFLAGS = -static -nostdlib --stack 0x10000 -Map kpm.map -T$(SDK_DIR)/sources/newlib/app.lds --image-base 0
|
||||
LDFLAGS = -static -nostdlib --stack 0x10000 -Map kpm.map -T$(SDK_DIR)/sources/newlib/app.lds --image-base 0 --subsystem native
|
||||
|
||||
SOURCES = http.asm \
|
||||
kpm.c \
|
||||
utils.c \
|
||||
collection.cpp \
|
||||
tinyxml/tinyxml.cpp \
|
||||
tinyxml/tinystr.cpp \
|
||||
tinyxml/tinyxmlparser.cpp \
|
||||
tinyxml/tinyxmlerror.cpp \
|
||||
7z/7z.c \
|
||||
7z/7zFile.c \
|
||||
7z/7zStream.c \
|
||||
7z/7zCrc.c \
|
||||
7z/7zCrcOpt.c \
|
||||
7z/CpuArch.c \
|
||||
7z/7zArcIn.c \
|
||||
7z/7zBuf.c \
|
||||
7z/7zDec.c \
|
||||
7z/LzmaDec.c \
|
||||
7z/Lzma2Dec.c \
|
||||
7z/Bcj2.c \
|
||||
7z/Delta.c \
|
||||
7z/Bra.c \
|
||||
7z/Bra86.c \
|
||||
7z/BraIA64.c \
|
||||
7z/7zAlloc.c \
|
||||
$(NULL)
|
||||
SOURCES = http.asm \
|
||||
kpm.c \
|
||||
utils.c \
|
||||
collection.cpp \
|
||||
tinyxml/tinyxml.cpp \
|
||||
tinyxml/tinystr.cpp \
|
||||
tinyxml/tinyxmlparser.cpp \
|
||||
tinyxml/tinyxmlerror.cpp \
|
||||
7z/7z.c \
|
||||
7z/7zFile.c \
|
||||
7z/7zStream.c \
|
||||
7z/7zCrc.c \
|
||||
7z/7zCrcOpt.c \
|
||||
7z/CpuArch.c \
|
||||
7z/7zArcIn.c \
|
||||
7z/7zBuf.c \
|
||||
7z/7zDec.c \
|
||||
7z/LzmaDec.c \
|
||||
7z/Lzma2Dec.c \
|
||||
7z/Bcj2.c \
|
||||
7z/Delta.c \
|
||||
7z/Bra.c \
|
||||
7z/Bra86.c \
|
||||
7z/BraIA64.c \
|
||||
7z/7zAlloc.c \
|
||||
$(NULL)
|
||||
|
||||
OBJECTS = $(patsubst %.asm, %.o, $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SOURCES))))
|
||||
OBJECTS = $(patsubst %.asm, %.o, $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(SOURCES))))
|
||||
|
||||
# targets
|
||||
|
||||
all:$(NAME)
|
||||
all: $(NAME)
|
||||
|
||||
$(NAME): $(OBJECTS) Makefile
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(OBJECTS) $(LIBS)
|
||||
@ -75,7 +74,7 @@ $(NAME): $(OBJECTS) Makefile
|
||||
|
||||
|
||||
clean:
|
||||
-rm -f *.o
|
||||
-rm -f *.o */*.o
|
||||
|
||||
|
||||
|
||||
|
@ -1,129 +0,0 @@
|
||||
/*OUTPUT_FORMAT("binary")*/
|
||||
|
||||
ENTRY(__start)
|
||||
SECTIONS
|
||||
{
|
||||
.text 0x000000:
|
||||
{
|
||||
LONG(0x554e454D);
|
||||
LONG(0x32305445);
|
||||
LONG(1);
|
||||
LONG(__start);
|
||||
LONG(___iend);
|
||||
LONG(___memsize);
|
||||
LONG(___stacktop);
|
||||
LONG(___cmdline);
|
||||
LONG(___pgmname); /* full path */
|
||||
LONG(0); /*FIXME tls data */
|
||||
LONG(__idata_start)
|
||||
LONG(__idata_end)
|
||||
LONG(_main)
|
||||
|
||||
*(.init)
|
||||
*(.text)
|
||||
*(SORT(.text$*))
|
||||
*(.text.*)
|
||||
*(.glue_7t)
|
||||
*(.glue_7)
|
||||
___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
|
||||
LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*)); LONG (0);
|
||||
___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
|
||||
LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*)); LONG (0);
|
||||
*(.fini)
|
||||
/* ??? Why is .gcc_exc here? */
|
||||
*(.gcc_exc)
|
||||
PROVIDE (etext = .);
|
||||
*(.gcc_except_table)
|
||||
}
|
||||
|
||||
.rdata ALIGN(32) :
|
||||
{
|
||||
*(.rdata)
|
||||
*(SORT(.rdata$*))
|
||||
___RUNTIME_PSEUDO_RELOC_LIST__ = .;
|
||||
__RUNTIME_PSEUDO_RELOC_LIST__ = .;
|
||||
*(.rdata_runtime_pseudo_reloc)
|
||||
___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
|
||||
__RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
|
||||
}
|
||||
|
||||
.CRT ALIGN(32) :
|
||||
{
|
||||
___crt_xc_start__ = . ;
|
||||
*(SORT(.CRT$XC*)) /* C initialization */
|
||||
___crt_xc_end__ = . ;
|
||||
___crt_xi_start__ = . ;
|
||||
*(SORT(.CRT$XI*)) /* C++ initialization */
|
||||
___crt_xi_end__ = . ;
|
||||
___crt_xl_start__ = . ;
|
||||
*(SORT(.CRT$XL*)) /* TLS callbacks */
|
||||
/* ___crt_xl_end__ is defined in the TLS Directory support code */
|
||||
___crt_xp_start__ = . ;
|
||||
*(SORT(.CRT$XP*)) /* Pre-termination */
|
||||
___crt_xp_end__ = . ;
|
||||
___crt_xt_start__ = . ;
|
||||
*(SORT(.CRT$XT*)) /* Termination */
|
||||
___crt_xt_end__ = . ;
|
||||
}
|
||||
|
||||
.data ALIGN(32) :
|
||||
{
|
||||
PROVIDE ( __data_start__ = .) ;
|
||||
*(.data)
|
||||
*(.data2)
|
||||
*(SORT(.data$*))
|
||||
*(.jcr)
|
||||
__CRT_MT = .;
|
||||
LONG(0);
|
||||
PROVIDE ( __data_end__ = .) ;
|
||||
*(.data_cygwin_nocopy)
|
||||
___iend = . ;
|
||||
}
|
||||
|
||||
.idata ALIGN(32):
|
||||
{
|
||||
__idata_start = .;
|
||||
SORT(*)(.idata$2)
|
||||
SORT(*)(.idata$3)
|
||||
/* These zeroes mark the end of the import list. */
|
||||
LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
|
||||
SORT(*)(.idata$4)
|
||||
SORT(*)(.idata$5)
|
||||
SORT(*)(.idata$6)
|
||||
SORT(*)(.idata$7)
|
||||
__idata_end = . ;
|
||||
}
|
||||
|
||||
bss ALIGN(32):
|
||||
{
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
. = ALIGN(16);
|
||||
___cmdline = .;
|
||||
. = . + 256;
|
||||
___pgmname = .;
|
||||
. = . + 1024 + 16;
|
||||
___stacktop = .;
|
||||
___memsize = . ;
|
||||
}
|
||||
|
||||
/DISCARD/ :
|
||||
{
|
||||
*(.debug$S)
|
||||
*(.debug$T)
|
||||
*(.debug$F)
|
||||
*(.drectve)
|
||||
*(.note.GNU-stack)
|
||||
*(.eh_frame)
|
||||
*(.comment)
|
||||
*(.debug_abbrev)
|
||||
*(.debug_info)
|
||||
*(.debug_line)
|
||||
*(.debug_frame)
|
||||
*(.debug_loc)
|
||||
*(.debug_pubnames)
|
||||
*(.debug_aranges)
|
||||
*(.debug_ranges)
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user