sdk: update Makefiles

git-svn-id: svn://kolibrios.org@6531 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2016-09-22 16:14:35 +00:00
parent 0037f58143
commit e2cbc758d1
11 changed files with 68 additions and 61 deletions

View File

@ -1,12 +1,12 @@
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 \
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
#####################################

View File

@ -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 $@ $<

View File

@ -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 $@ $<

View File

@ -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 $@ $<

View File

@ -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="<ftconfig.h>" -DFT_CONFIG_MODULES_H="<ftmodule.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

View File

@ -5,16 +5,17 @@ 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
LDFLAGS+= --out-implib $(LIBRARY).dll.a
ARFLAGS = crs
INSTALLDIR:= /home/autobuild/tools/win32/lib
INCLUDES= -I. -I./include/drm -I../newlib/libc/include
LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib
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
LIBS:= -ldll -lc.dll
@ -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 $@ $<

View File

@ -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 $@ $<

View File

@ -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

View File

@ -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 $@ $<

View File

@ -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 $@ $<

View File

@ -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) $< $@