From 3ed8d4e7a087ce55f94c33e7f48026fb1b95b5ab Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Fri, 11 Apr 2014 05:53:42 +0000 Subject: [PATCH] sdk: Makefiles git-svn-id: svn://kolibrios.org@4819 a494cfbc-eb01-0410-851d-a64ba20cac60 --- contrib/sdk/sources/Intel-2D/Makefile | 8 ++- contrib/sdk/sources/Makefile | 70 +++++++++++++++++++++++++++ contrib/sdk/sources/cairo/Makefile | 14 +++--- contrib/sdk/sources/ffmpeg/config.mak | 2 +- contrib/sdk/sources/libdrm/Makefile | 8 ++- contrib/sdk/sources/pixman/Makefile | 11 ++--- contrib/sdk/sources/zlib/Makefile | 6 +-- 7 files changed, 91 insertions(+), 28 deletions(-) create mode 100644 contrib/sdk/sources/Makefile diff --git a/contrib/sdk/sources/Intel-2D/Makefile b/contrib/sdk/sources/Intel-2D/Makefile index 5f5839aa79..2fade8d4bf 100644 --- a/contrib/sdk/sources/Intel-2D/Makefile +++ b/contrib/sdk/sources/Intel-2D/Makefile @@ -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 diff --git a/contrib/sdk/sources/Makefile b/contrib/sdk/sources/Makefile new file mode 100644 index 0000000000..c7d3ffd232 --- /dev/null +++ b/contrib/sdk/sources/Makefile @@ -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 + + \ No newline at end of file diff --git a/contrib/sdk/sources/cairo/Makefile b/contrib/sdk/sources/cairo/Makefile index ad40be9036..d1f98bbe15 100644 --- a/contrib/sdk/sources/cairo/Makefile +++ b/contrib/sdk/sources/cairo/Makefile @@ -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 $@ $< diff --git a/contrib/sdk/sources/ffmpeg/config.mak b/contrib/sdk/sources/ffmpeg/config.mak index d3ec3a0f3c..5750685e95 100644 --- a/contrib/sdk/sources/ffmpeg/config.mak +++ b/contrib/sdk/sources/ffmpeg/config.mak @@ -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 diff --git a/contrib/sdk/sources/libdrm/Makefile b/contrib/sdk/sources/libdrm/Makefile index d050b1fc96..0256a1501c 100644 --- a/contrib/sdk/sources/libdrm/Makefile +++ b/contrib/sdk/sources/libdrm/Makefile @@ -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 diff --git a/contrib/sdk/sources/pixman/Makefile b/contrib/sdk/sources/pixman/Makefile index d1ea7d8245..cf96600e39 100644 --- a/contrib/sdk/sources/pixman/Makefile +++ b/contrib/sdk/sources/pixman/Makefile @@ -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) diff --git a/contrib/sdk/sources/zlib/Makefile b/contrib/sdk/sources/zlib/Makefile index 1789c2f96b..73ff70182e 100644 --- a/contrib/sdk/sources/zlib/Makefile +++ b/contrib/sdk/sources/zlib/Makefile @@ -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