From e2cbc758d108a3b999b69123cec9f26f94b6fcc2 Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Thu, 22 Sep 2016 16:14:35 +0000 Subject: [PATCH] sdk: update Makefiles git-svn-id: svn://kolibrios.org@6531 a494cfbc-eb01-0410-851d-a64ba20cac60 --- contrib/sdk/sources/Makefile | 28 +++++++++---------- contrib/sdk/sources/cairo/Makefile | 15 +++++----- contrib/sdk/sources/eglut/Makefile | 12 ++++---- contrib/sdk/sources/expat/Makefile | 4 ++- contrib/sdk/sources/freetype/Makefile | 14 +++++----- contrib/sdk/sources/libdrm/Makefile | 21 +++++++------- contrib/sdk/sources/libjpeg/Makefile | 12 ++++---- contrib/sdk/sources/libpng/Makefile | 12 ++++---- contrib/sdk/sources/libstdc++-v3/Makefile | 4 ++- .../sources/libstdc++-v3/libsupc++/Makefile | 4 ++- contrib/sdk/sources/libsync/Makefile | 3 +- 11 files changed, 68 insertions(+), 61 deletions(-) diff --git a/contrib/sdk/sources/Makefile b/contrib/sdk/sources/Makefile index 0242116b65..ac2504e77a 100644 --- a/contrib/sdk/sources/Makefile +++ b/contrib/sdk/sources/Makefile @@ -1,13 +1,13 @@ DLL_DIR:= $(abspath ../bin) -LIB_DIR:= $(abspath ../lib) +LIB_DIR:= /home/autobuild/tools/win32/lib # targets -all: libsync newlib zlib libpng freetype pixman cairo \ - libdrm pixlib ffmpeg libsupc++ libstdc++ gcc_eh expat \ - Mesa eglut vaapi sound +all: libsync newlib zlib libpng libjpeg freetype pixman cairo \ + libdrm pixlib ffmpeg libsupc++ libstdc++ expat \ + Mesa eglut vaapi sound libsync: $(LIB_DIR)/libsync.a @@ -16,9 +16,9 @@ $(LIB_DIR)/libsync.a: ##################################### -newlib: $(DLL_DIR)/libc.dll $(LIB_DIR)/libc.dll.a $(LIB_DIR)/libapp.a $(LIB_DIR)/libdll.a +newlib: $(DLL_DIR)/libc.dll $(LIB_DIR)/libc.dll.a $(LIB_DIR)/libdll.a -$(DLL_DIR)/libc.dll $(LIB_DIR)/libc.dll.a $(LIB_DIR)/libapp.a $(LIB_DIR)/libdll.a: +$(DLL_DIR)/libc.dll $(LIB_DIR)/libc.dll.a $(LIB_DIR)/libdll.a: $(MAKE) -C newlib/libc shared $(MAKE) -C newlib/libc install @@ -38,6 +38,13 @@ $(DLL_DIR)/libpng16.dll $(LIB_DIR)/libpng16.dll.a $(LIB_DIR)/libpng16.a: newlib ##################################### +libjpeg: $(DLL_DIR)/libjpeg.dll $(LIB_DIR)/libjpeg.dll.a $(LIB_DIR)/libjpeg.a + +$(DLL_DIR)/libjpeg.dll $(LIB_DIR)/libjpeg.dll.a $(LIB_DIR)/libjpeg.a: newlib zlib + $(MAKE) -C libjpeg + +##################################### + 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: newlib @@ -122,18 +129,11 @@ $(LIB_DIR)/libexpat.a: newlib ##################################### -gcc_eh: $(LIB_DIR)/libgcc_eh.a - -$(LIB_DIR)/libgcc_eh.a: newlib - $(MAKE) -C gcc_eh - -##################################### - Mesa: $(DLL_DIR)/libGL.dll $(DLL_DIR)/libegl.dll $(DLL_DIR)/i965_dri.drv $(DLL_DIR)/libGL.dll $(DLL_DIR)/libegl.dll $(DLL_DIR)/i965_dri.drv \ $(LIB_DIR)/libGL.dll.a $(LIB_DIR)/libegl.dll.a \ - $(LIB_DIR)/libglsl.a: newlib libdrm libsupc++ gcc_eh expat + $(LIB_DIR)/libglsl.a: newlib libdrm libsupc++ expat $(MAKE) -C Mesa/mesa-9.2.5 ##################################### diff --git a/contrib/sdk/sources/cairo/Makefile b/contrib/sdk/sources/cairo/Makefile index dd028c5f83..4dfada5a8c 100644 --- a/contrib/sdk/sources/cairo/Makefile +++ b/contrib/sdk/sources/cairo/Makefile @@ -5,9 +5,11 @@ AR = kos32-ar LD = kos32-ld STRIP = kos32-strip +INSTALLDIR:= /home/autobuild/tools/win32/lib + CFLAGS = -c -O2 -ffast-math -Wall -Winline -Wno-attributes -fno-ident -fomit-frame-pointer -LDFLAGS = -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --version-script cairo.ver --output-def $(LIBRARY).orig.def +LDFLAGS = -shared -s -T dll.lds --entry _DllStartup --image-base=0 --version-script cairo.ver --output-def $(LIBRARY).orig.def LDFLAGS+= --out-implib lib$(LIBRARY).dll.a ARFLAGS = crs @@ -16,9 +18,7 @@ DEFINES = -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -U_MSC_VER -DHAVE_CONFIG_H INCLUDES = -I. -I../newlib/libc/include -I../pixman -I../zlib -I../libpng -I../freetype/include -LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib - -LIBS:= -ldll -lgcc -lfreetype.dll -lz.dll -lpixman-1.dll -lpng16.dll -lc.dll +LIBS:= -ldll -lfreetype.dll -lz.dll -lpixman-1.dll -lpng16.dll -lgcc -lc.dll CAIRO_SOURCES = \ cairo.c \ @@ -157,16 +157,15 @@ ebox: lib$(LIBRARY).a $(LIBRARY).dll lib$(LIBRARY).a: $(OBJECTS) Makefile $(AR) $(ARFLAGS) lib$(LIBRARY).a $(OBJECTS) - mv -f lib$(LIBRARY).a ../../lib - + mv -f lib$(LIBRARY).a $(INSTALLDIR) $(LIBRARY).dll: $(OBJECTS) Makefile - $(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(OBJECTS) $(LIBS) + $(LD) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS) #sed -e "s/ @[^ ]*//" $(LIBRARY).orig.def > $(LIBRARY).def #sed -f ../newlib/cmd1.sed $(LIBRARY).def > mem #sed -f ../newlib/cmd2.sed mem >$(LIBRARY).inc mv -f $@ ../../bin - mv -f lib$(LIBRARY).dll.a ../../lib + mv -f lib$(LIBRARY).dll.a $(INSTALLDIR) %.o : %.c $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< diff --git a/contrib/sdk/sources/eglut/Makefile b/contrib/sdk/sources/eglut/Makefile index 82b1a25bda..973d0f49b2 100644 --- a/contrib/sdk/sources/eglut/Makefile +++ b/contrib/sdk/sources/eglut/Makefile @@ -1,4 +1,3 @@ - LIBRARY= libeglut IMPLIB= libeglut.dll.a @@ -6,14 +5,15 @@ CC = kos32-gcc AR = kos32-ar LD = kos32-ld +INSTALLDIR:= /home/autobuild/tools/win32/lib + CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -fomit-frame-pointer INCLUDES= -I. -I../newlib/libc/include -I../Mesa/mesa-9.2.5/include -I../Mesa/mesa-9.2.5/src/gbm/main -I../libdrm/include -LDFLAGS:= -shared -s -nostdlib -T ../newlib/libc/dll.lds --entry _DllStartup --image-base=0 +LDFLAGS:= -shared -s -T dll.lds --entry _DllStartup --image-base=0 LDFLAGS+= --out-implib $(IMPLIB) -LIBPATH:= -L../../lib LIBS:= -ldll -legl.dll -lGL.dll -lc.dll DEFINES= -D__unix__ -DMESA_EGL_NO_X11_HEADERS @@ -35,12 +35,12 @@ all:$(LIBRARY).a $(LIBRARY).dll $(LIBRARY).a: $(OBJECTS) Makefile $(AR) crs $(LIBRARY).a $(OBJECTS) - mv -f $(LIBRARY).a ../../lib + mv -f $(LIBRARY).a $(INSTALLDIR) $(LIBRARY).dll: $(OBJECTS) Makefile - $(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(OBJECTS) $(LIBS) + $(LD) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS) mv -f $(LIBRARY).dll ../../bin - mv -f $(IMPLIB) ../../lib + mv -f $(IMPLIB) $(INSTALLDIR) %.o : %.c Makefile eglut.h eglutint.h render.h $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< diff --git a/contrib/sdk/sources/expat/Makefile b/contrib/sdk/sources/expat/Makefile index 2614e4998f..d96b15ce0e 100644 --- a/contrib/sdk/sources/expat/Makefile +++ b/contrib/sdk/sources/expat/Makefile @@ -4,6 +4,8 @@ CC = kos32-gcc AR = kos32-ar LD = kos32-ld +INSTALLDIR:= /home/autobuild/tools/win32/lib + CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -fomit-frame-pointer ARFLAGS = crs @@ -29,7 +31,7 @@ all:$(LIBRARY).a $(LIBRARY).a: $(OBJS) Makefile $(AR) $(ARFLAGS) $(LIBRARY).a $(OBJS) - mv -f $(LIBRARY).a ../../lib + mv -f $(LIBRARY).a $(INSTALLDIR) %.o : %.c Makefile $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< diff --git a/contrib/sdk/sources/freetype/Makefile b/contrib/sdk/sources/freetype/Makefile index 1781861d56..18286a7750 100644 --- a/contrib/sdk/sources/freetype/Makefile +++ b/contrib/sdk/sources/freetype/Makefile @@ -5,18 +5,18 @@ AR = kos32-ar LD = kos32-ld STRIP = kos32-strip +INSTALLDIR:= /home/autobuild/tools/win32/lib + CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -Wall -Winline -fno-ident -fomit-frame-pointer -LDFLAGS = -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 +LDFLAGS = -shared -s -T dll.lds --entry _DllStartup --image-base=0 LDFLAGS+= --out-implib lib$(LIBRARY).dll.a ARFLAGS = crs INCLUDES= -I../newlib/libc/include -I./include -I./include/freetype/config -LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib - -LIBS:= -ldll -lc.dll -lgcc +LIBS:= -ldll -lgcc -lc.dll DEFINES:= -DFT_CONFIG_CONFIG_H="" -DFT_CONFIG_MODULES_H="" -DFT2_BUILD_LIBRARY @@ -77,15 +77,15 @@ ebox:lib$(LIBRARY).a $(LIBRARY).dll lib$(LIBRARY).a: $(OBJECTS) Makefile $(AR) cvrs lib$(LIBRARY).a $(OBJECTS) - mv -f lib$(LIBRARY).a ../../lib + mv -f lib$(LIBRARY).a $(INSTALLDIR) $(LIBRARY).dll: lib$(LIBRARY).def $(OBJECTS) Makefile - $(LD) $(LDFLAGS) $(LIBPATH) -o $@ lib$(LIBRARY).def $(OBJECTS) $(LIBS) + $(LD) $(LDFLAGS) -o $@ lib$(LIBRARY).def $(OBJECTS) $(LIBS) $(STRIP) $@ #sed -f ../newlib/cmd1.sed lib$(LIBRARY).def > mem #sed -f ../newlib/cmd2.sed mem >$(LIBRARY).inc mv -f $@ ../../bin - mv -f lib$(LIBRARY).dll.a ../../lib + mv -f lib$(LIBRARY).dll.a $(INSTALLDIR) %.o : %.c Makefile diff --git a/contrib/sdk/sources/libdrm/Makefile b/contrib/sdk/sources/libdrm/Makefile index 080219687c..f2bec61392 100644 --- a/contrib/sdk/sources/libdrm/Makefile +++ b/contrib/sdk/sources/libdrm/Makefile @@ -4,18 +4,19 @@ CC = kos32-gcc AR = kos32-ar LD = kos32-ld STRIP = kos32-strip - -CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -march=i686 -O2 -fno-ident -fomit-frame-pointer -LDFLAGS:= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --version-script libdrm.ver --image-base=0 +INSTALLDIR:= /home/autobuild/tools/win32/lib + +INCLUDES= -I. -I./include/drm -I../newlib/libc/include + +CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -D_POSIX_TIMERS -D_POSIX_MONOTONIC_CLOCK +CFLAGS+= -c -march=i686 -O2 -fno-ident -fomit-frame-pointer + +LDFLAGS:= -shared -s -T dll.lds --entry _DllStartup --version-script libdrm.ver --image-base=0 LDFLAGS+= --out-implib $(LIBRARY).dll.a ARFLAGS = crs -INCLUDES= -I. -I./include/drm -I../newlib/libc/include - -LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib - LIBS:= -ldll -lc.dll DEFINES= @@ -33,12 +34,12 @@ all:$(LIBRARY).a $(LIBRARY).dll $(LIBRARY).a: $(OBJECTS) Makefile $(AR) $(ARFLAGS) $(LIBRARY).a $(OBJECTS) - mv -f $(LIBRARY).a ../../lib + mv -f $(LIBRARY).a $(INSTALLDIR) $(LIBRARY).dll: $(OBJECTS) Makefile - $(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(OBJECTS) $(LIBS) + $(LD) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS) mv -f $@ ../../bin - mv -f $(LIBRARY).dll.a ../../lib + mv -f $(LIBRARY).dll.a $(INSTALLDIR) %.o : %.c Makefile $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< diff --git a/contrib/sdk/sources/libjpeg/Makefile b/contrib/sdk/sources/libjpeg/Makefile index 0a0d475f1c..9ade9ec9f4 100644 --- a/contrib/sdk/sources/libjpeg/Makefile +++ b/contrib/sdk/sources/libjpeg/Makefile @@ -9,17 +9,17 @@ AR = kos32-ar LD = kos32-ld STRIP = kos32-strip +INSTALLDIR:= /home/autobuild/tools/win32/lib + CFLAGS = -UWIN32 -UWindows -U_WINDOWS -U_WIN32 -U__WIN32__ -c -O2 -fno-ident -fomit-frame-pointer -LDFLAGS= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 +LDFLAGS= -shared -s -T dll.lds --entry _DllStartup --image-base=0 LDFLAGS+= --out-implib $(LIBRARY).dll.a ARFLAGS:= crs INCLUDES= -I. -I../newlib/libc/include -I../zlib -LIBPATH:= -L/home/autobuild/tools/win32/lib - LIBS:= -ldll -lc.dll -lz.dll DEFS = -DHAVE_CONFIG_H @@ -58,13 +58,13 @@ all: $(LIBRARY).a $(LIBRARY).dll $(LIBRARY).a: $(LIBOBJECTS) Makefile $(AR) $(ARFLAGS) $(LIBRARY).a $(LIBOBJECTS) - mv -f $(LIBRARY).a ../../lib + mv -f $(LIBRARY).a $(INSTALLDIR) $(LIBRARY).dll: $(LIBOBJECTS) Makefile - $(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(LIBOBJECTS) $(LIBS) + $(LD) $(LDFLAGS) -o $@ $(LIBOBJECTS) $(LIBS) $(STRIP) $@ mv -f $@ ../../bin - mv -f $(LIBRARY).dll.a ../../lib + mv -f $(LIBRARY).dll.a $(INSTALLDIR) %.o : %.c Makefile $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< diff --git a/contrib/sdk/sources/libpng/Makefile b/contrib/sdk/sources/libpng/Makefile index c6502e694b..4783125911 100644 --- a/contrib/sdk/sources/libpng/Makefile +++ b/contrib/sdk/sources/libpng/Makefile @@ -5,17 +5,17 @@ AR = kos32-ar LD = kos32-ld STRIP = kos32-strip +INSTALLDIR:= /home/autobuild/tools/win32/lib + CFLAGS = -UWIN32 -UWindows -U_WINDOWS -U_WIN32 -U__WIN32__ -c -O2 -fno-ident -fomit-frame-pointer -LDFLAGS= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 +LDFLAGS= -shared -s -T dll.lds --entry _DllStartup --image-base=0 LDFLAGS+= --out-implib $(LIBRARY).dll.a ARFLAGS:= crs INCLUDES= -I. -I../newlib/libc/include -I../zlib -LIBPATH:= -L../../lib - LIBS:= -ldll -lc.dll -lz.dll DEFS = -DHAVE_CONFIG_H @@ -47,15 +47,15 @@ ebox:$(LIBRARY).a $(LIBRARY).dll $(LIBRARY).a: $(OBJECTS) Makefile $(AR) $(ARFLAGS) $(LIBRARY).a $(OBJECTS) - mv -f $(LIBRARY).a ../../lib + mv -f $(LIBRARY).a $(INSTALLDIR) $(LIBRARY).dll: libpng16.def $(OBJECTS) Makefile - $(LD) $(LDFLAGS) $(LIBPATH) -o $@ libpng16.def $(OBJECTS) $(LIBS) + $(LD) $(LDFLAGS) -o $@ libpng16.def $(OBJECTS) $(LIBS) $(STRIP) $@ #sed -f ../newlib/cmd1.sed libpng16.def > mem #sed -f ../newlib/cmd2.sed mem >libpng.inc mv -f $@ ../../bin - mv -f $(LIBRARY).dll.a ../../lib + mv -f $(LIBRARY).dll.a $(INSTALLDIR) %.o : %.c Makefile diff --git a/contrib/sdk/sources/libstdc++-v3/Makefile b/contrib/sdk/sources/libstdc++-v3/Makefile index b039b3fac2..abb5ac3e11 100644 --- a/contrib/sdk/sources/libstdc++-v3/Makefile +++ b/contrib/sdk/sources/libstdc++-v3/Makefile @@ -6,6 +6,8 @@ LD = kos32-ld CPP= kos32-g++ STRIP = kos32-strip +INSTALLDIR:= /home/autobuild/tools/win32/lib + CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -fomit-frame-pointer -ffunction-sections -fdata-sections CFLAGS+= -fno-rtti -fno-exceptions @@ -127,7 +129,7 @@ all:$(LIBRARY).a $(LIBRARY).a: $(OBJ98) $(OBJ11) $(com_obj) Makefile $(AR) $(ARFLAGS) $(LIBRARY).a $(OBJ98) $(OBJ11) $(com_obj) - mv -f $(LIBRARY).a ../../lib + mv -f $(LIBRARY).a $(INSTALLDIR) %.o : %.c Makefile $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< diff --git a/contrib/sdk/sources/libstdc++-v3/libsupc++/Makefile b/contrib/sdk/sources/libstdc++-v3/libsupc++/Makefile index c930829c2c..d4d7cfe5f7 100644 --- a/contrib/sdk/sources/libstdc++-v3/libsupc++/Makefile +++ b/contrib/sdk/sources/libstdc++-v3/libsupc++/Makefile @@ -6,6 +6,8 @@ LD = kos32-ld CPP= kos32-g++ STRIP = kos32-strip +INSTALLDIR:= /home/autobuild/tools/win32/lib + CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -fomit-frame-pointer CPPFLAGS = -fno-rtti @@ -77,7 +79,7 @@ all:$(LIBRARY).a $(LIBRARY).a: $(OBJECTS) Makefile $(AR) $(ARFLAGS) $(LIBRARY).a $(OBJECTS) - mv -f $(LIBRARY).a ../../../lib + mv -f $(LIBRARY).a $(INSTALLDIR) %.o : %.c Makefile $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< diff --git a/contrib/sdk/sources/libsync/Makefile b/contrib/sdk/sources/libsync/Makefile index e112b40a05..24a8412bb1 100644 --- a/contrib/sdk/sources/libsync/Makefile +++ b/contrib/sdk/sources/libsync/Makefile @@ -3,6 +3,7 @@ LIBRARY= libsync FASM = fasm AR = kos32-ar ARFLAGS = crs +INSTALLDIR:= /home/autobuild/tools/win32/lib SRCS = mutex.asm \ m_destroy.asm \ @@ -19,7 +20,7 @@ all: libsync.a libsync.a: $(OBJS) Makefile $(AR) $(ARFLAGS) libsync.a $(OBJS) - mv -f libsync.a ../../lib + mv -f libsync.a $(INSTALLDIR) %.o : %.asm Makefile $(FASM) $< $@