sdk: Makefiles

git-svn-id: svn://kolibrios.org@4819 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2014-04-11 05:53:42 +00:00
parent e69d64552e
commit 3ed8d4e7a0
7 changed files with 91 additions and 28 deletions

View File

@ -1,13 +1,11 @@
CC=gcc
LD = ld
AR= ar
LIBRARY= pixlib
CC=gcc
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fomit-frame-pointer
LD = ld
AR= ar
STRIP = $(PREFIX)strip
LDFLAGS:= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0

View File

@ -0,0 +1,70 @@
DLL_DIR:= $(abspath ../bin)
LIB_DIR:= $(abspath ../lib)
# targets
all: newlib zlib libpng freetype pixman cairo \
libdrm pixlib
newlib: $(DLL_DIR)/libc.dll $(LIB_DIR)/libc.dll.a $(LIB_DIR)/libapp.a $(LIB_DIR)/libdll.a
$(DLL_DIR)/libc.dll $(LIB_DIR)/libapp.a $(LIB_DIR)/libdll.a:
$(MAKE) -C newlib shared
$(MAKE) -C newlib install
#####################################
zlib: $(DLL_DIR)/libz.dll $(LIB_DIR)/libz.a $(LIB_DIR)/libz.dll.a
$(DLL_DIR)/libz.dll $(LIB_DIR)/libz.a $(LIB_DIR)/libz.dll.a: $(LIB_DIR)/libdll.a $(LIB_DIR)/libc.dll.a
$(MAKE) -C zlib
#####################################
libpng: $(DLL_DIR)/libpng16.dll $(LIB_DIR)/libpng16.dll.a $(LIB_DIR)/libpng16.a
$(DLL_DIR)/libpng16.dll $(LIB_DIR)/libpng16.dll.a $(LIB_DIR)/libpng16.a:\
$(LIB_DIR)/libdll.a $(LIB_DIR)/libc.dll.a $(LIB_DIR)/libz.dll.a
$(MAKE) -C libpng
#####################################
freetype: $(DLL_DIR)/freetype.dll $(LIB_DIR)/libfreetype.dll.a $(LIB_DIR)/libfreetype.a
$(DLL_DIR)/freetype.dll $(LIB_DIR)/libfreetype.dll.a $(LIB_DIR)/libfreetype.a:\
$(LIB_DIR)/libdll.a $(LIB_DIR)/libc.dll.a
$(MAKE) -C freetype
#####################################
pixman: $(DLL_DIR)/pixman-1.dll $(LIB_DIR)/libpixman-1.dll.a $(LIB_DIR)/libpixman-1.a
$(DLL_DIR)/pixman-1.dll $(LIB_DIR)/libpixman-1.dll.a $(LIB_DIR)/libpixman-1.a:\
$(LIB_DIR)/libdll.a $(LIB_DIR)/libc.dll.a
$(MAKE) -C pixman
#####################################
cairo: $(DLL_DIR)/cairo2.dll $(LIB_DIR)/libcairo2.dll.a $(LIB_DIR)/libcairo2.a
$(DLL_DIR)/cairo2.dll $(LIB_DIR)/libcairo2.dll.a $(LIB_DIR)/libcairo2.a:\
newlib freetype zlib pixman libpng
$(MAKE) -C cairo
#####################################
libdrm: $(DLL_DIR)/libdrm.dll $(LIB_DIR)/libdrm.dll.a $(LIB_DIR)/libdrm.a
$(DLL_DIR)/libdrm.dll $(LIB_DIR)/libdrm.dll.a $(LIB_DIR)/libdrm.a: $(LIB_DIR)/libdll.a $(LIB_DIR)/libc.dll.a
$(MAKE) -C libdrm
#####################################
pixlib: $(DLL_DIR)/pixlib.dll
$(DLL_DIR)/pixlib.dll: $(LIB_DIR)/libdll.a $(LIB_DIR)/libc.dll.a $(LIB_DIR)/libdrm.dll.a
$(MAKE) -C Intel-2D

View File

@ -5,7 +5,7 @@ CC = gcc
CFLAGS = -c -O2 -ffast-math -Wall -Winline -Wno-attributes -fomit-frame-pointer
LD = ld
LDFLAGS = -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --version-script cairo.ver --output-def $(LIBRARY).orig.def --out-implib $(LIBRARY).dll.a
LDFLAGS = -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --version-script cairo.ver --output-def $(LIBRARY).orig.def --out-implib lib$(LIBRARY).dll.a
STRIP = $(PREFIX)strip
@ -149,13 +149,13 @@ endif
# targets
all: $(LIBRARY).a $(LIBRARY).dll
all: lib$(LIBRARY).a $(LIBRARY).dll
ebox: $(LIBRARY).a $(LIBRARY).dll
ebox: lib$(LIBRARY).a $(LIBRARY).dll
$(LIBRARY).a: $(OBJECTS) Makefile
ar cvrs $(LIBRARY).a $(OBJECTS)
mv -f $(LIBRARY).a ../../lib
lib$(LIBRARY).a: $(OBJECTS) Makefile
ar cvrs lib$(LIBRARY).a $(OBJECTS)
mv -f lib$(LIBRARY).a ../../lib
$(LIBRARY).dll: $(OBJECTS) Makefile
@ -165,7 +165,7 @@ $(LIBRARY).dll: $(OBJECTS) Makefile
sed -f ../newlib/cmd1.sed $(LIBRARY).def > mem
sed -f ../newlib/cmd2.sed mem >$(LIBRARY).inc
mv -f $@ ../../bin
mv -f $(LIBRARY).dll.a ../../lib
mv -f lib$(LIBRARY).dll.a ../../lib
%.o : %.c
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<

View File

@ -34,7 +34,7 @@ STRIP=strip
CP=cp -p
LN_S=ln -s -f
CPPFLAGS= -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=32 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__
CFLAGS= -I../newlib/include -U_Win32 -U_WIN32 -U__MINGW32__ -std=c99 -march=pentium-mmx -fomit-frame-pointer -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -O2 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla
CFLAGS= -I../newlib/include -U_Win32 -U_WIN32 -U__MINGW32__ -std=c99 -fomit-frame-pointer -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -O2 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla
CXXFLAGS= -D__STDC_CONSTANT_MACROS
ASFLAGS= -I../newlib/include -U_Win32 -U_WIN32 -U__MINGW32__
AS_C=-c

View File

@ -1,13 +1,11 @@
CC=gcc
LD = ld
AR= ar
LIBRARY= libdrm
CC=gcc
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fomit-frame-pointer
LD = ld
AR= ar
STRIP = $(PREFIX)strip
LDFLAGS:= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --version-script libdrm.ver --image-base=0 --out-implib $(LIBRARY).dll.a

View File

@ -59,14 +59,13 @@ endif
# targets
all:$(LIBRARY).a $(LIBRARY).dll
all:lib$(LIBRARY).a $(LIBRARY).dll
ebox:$(LIBRARY).a $(LIBRARY).dll
ebox:$lib(LIBRARY).a $(LIBRARY).dll
$(LIBRARY).a: $(OBJECTS) Makefile
ar cvrs $(LIBRARY).a $(OBJECTS)
mv -f $(LIBRARY).a ../../lib
lib$(LIBRARY).a: $(OBJECTS) Makefile
ar cvrs lib$(LIBRARY).a $(OBJECTS)
mv -f lib$(LIBRARY).a ../../lib
$(LIBRARY).dll: $(LIBRARY).def $(OBJECTS) Makefile
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(LIBRARY).def $(OBJECTS) $(LIBS)

View File

@ -8,7 +8,7 @@
# For conditions of distribution and use, see copyright notice in zlib.h
STATICLIB = libz.a
SHAREDLIB = zlib.dll
SHAREDLIB = libz.dll
IMPLIB = libz.dll.a
PREFIX =
@ -26,8 +26,6 @@ ARFLAGS = rcs
STRIP = $(PREFIX)strip
LDIMPORT:= -nostdlib --out-implib libzimp.a
LDFLAGS:= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --out-implib $(IMPLIB)
INCLUDES= -I../newlib/include
@ -65,7 +63,7 @@ $(SHAREDLIB): zlib.def $(OBJS) $(OBJA) Makefile
$(STRIP) $@
sed -f ../newlib/cmd1.sed zlib.def > mem
sed -f ../newlib/cmd2.sed mem >zlib.inc
mv -f zlib.dll ../../bin
mv -f libz.dll ../../bin
mv -f libz.dll.a ../../lib