sdk: update

git-svn-id: svn://kolibrios.org@4367 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2013-12-16 00:16:20 +00:00
parent e2ec33712e
commit 70b3974a46
12 changed files with 1943 additions and 2166 deletions

View File

@ -57,6 +57,7 @@ uint32_t init_pixlib(uint32_t caps)
if (service != 0) if (service != 0)
return caps & hw_caps; return caps & hw_caps;
#ifndef BUILD_EBOX
service = get_service("DISPLAY"); service = get_service("DISPLAY");
if (service == 0) if (service == 0)
goto fail; goto fail;
@ -84,6 +85,7 @@ uint32_t init_pixlib(uint32_t caps)
(hw_caps & HW_VID_BLIT) != 0 ? "HW_VID_BLIT " : ""); (hw_caps & HW_VID_BLIT) != 0 ? "HW_VID_BLIT " : "");
return caps & hw_caps; return caps & hw_caps;
#endif
fail: fail:
service = 0; service = 0;
@ -280,3 +282,8 @@ int resize_bitmap(bitmap_t * bitmap)
return 0; return 0;
}; };
int sna_create_mask()
{
return 0;
};

View File

@ -0,0 +1,22 @@
LIBDRM {
global: DllStartup;
init_pixlib;
done_pixlib;
create_bitmap;
resize_bitmap;
destroy_bitmap;
lock_bitmap;
blit_bitmap;
fplay_blit_bitmap;
sna_bitmap_from_handle;
sna_blit_tex;
sna_create_mask;
sna_set_bo_handle;
local: __chkstk;
__chkstk_ms;
_alloca;
__uxa_lock;
_nm__tls_alloc;
*;
};

View File

@ -60,11 +60,6 @@ struct list sf_list;
int uxa_update_fb(struct intel_screen_private *intel); int uxa_update_fb(struct intel_screen_private *intel);
int sna_create_mask()
{
return 0;
};
static void i830_done_composite(PixmapPtr dest) static void i830_done_composite(PixmapPtr dest)
{ {
intel_screen_private *intel = intel_get_screen_private(); intel_screen_private *intel = intel_get_screen_private();

View File

@ -142,12 +142,16 @@ SOURCES= $(CAIRO_SOURCES)
OBJECTS = $(patsubst %.c, src/%.o, $(SOURCES)) OBJECTS = $(patsubst %.c, src/%.o, $(SOURCES))
ifeq ($(findstring ebox,$(MAKECMDGOALS)),ebox)
CFLAGS+=-march=pentium-mmx
endif
# targets # targets
all: $(LIBRARY).a $(LIBRARY).dll all: $(LIBRARY).a $(LIBRARY).dll
ebox: $(LIBRARY).a $(LIBRARY).dll
$(LIBRARY).a: $(OBJECTS) Makefile $(LIBRARY).a: $(OBJECTS) Makefile
ar cvrs $(LIBRARY).a $(OBJECTS) ar cvrs $(LIBRARY).a $(OBJECTS)

View File

@ -1,179 +0,0 @@
LIBRARY = cairo2
CC = gcc
CFLAGS = -c -O2 -march=pentium-mmx -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
STRIP = $(PREFIX)strip
DEFINES = -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -U_MSC_VER -DHAVE_CONFIG_H=1 -DCAIRO_NO_MUTEX=1
INCLUDES = -I. -I../newlib/include -I../pixman -I../zlib -I../libpng -I../freetype/include
LIBPATH:= -L../../lib
LIBS:= -ldll -lgcc -lfreetype.dll -lz.dll -lpixman-1.dll -lpng16.dll -lc.dll
CAIRO_SOURCES = \
cairo.c \
cairo-analysis-surface.c \
cairo-arc.c \
cairo-array.c \
cairo-atomic.c \
cairo-base64-stream.c \
cairo-base85-stream.c \
cairo-bentley-ottmann.c \
cairo-bentley-ottmann-rectangular.c \
cairo-bentley-ottmann-rectilinear.c \
cairo-botor-scan-converter.c \
cairo-boxes.c \
cairo-boxes-intersect.c \
cairo-cache.c \
cairo-cff-subset.c \
cairo-clip.c \
cairo-clip-boxes.c \
cairo-clip-polygon.c \
cairo-clip-region.c \
cairo-clip-surface.c \
cairo-clip-tor-scan-converter.c \
cairo-color.c \
cairo-composite-rectangles.c \
cairo-compositor.c \
cairo-contour.c \
cairo-damage.c \
cairo-debug.c \
cairo-default-context.c \
cairo-deflate-stream.c \
cairo-device.c \
cairo-error.c \
cairo-fallback-compositor.c \
cairo-fixed.c \
cairo-font-face.c \
cairo-font-face-twin.c \
cairo-font-face-twin-data.c \
cairo-font-options.c \
cairo-freed-pool.c \
cairo-freelist.c \
cairo-ft-font.c \
cairo-gstate.c \
cairo-hash.c \
cairo-hull.c \
cairo-image-compositor.c \
cairo-image-info.c \
cairo-image-source.c \
cairo-image-surface.c \
cairo-lzw.c \
cairo-mask-compositor.c \
cairo-matrix.c \
cairo-mempool.c \
cairo-mesh-pattern-rasterizer.c \
cairo-misc.c \
cairo-mono-scan-converter.c \
cairo-mutex.c \
cairo-no-compositor.c \
cairo-observer.c \
cairo-output-stream.c \
cairo-paginated-surface.c \
cairo-path.c \
cairo-path-bounds.c \
cairo-path-fill.c \
cairo-path-fixed.c \
cairo-path-in-fill.c \
cairo-path-stroke.c \
cairo-path-stroke-boxes.c \
cairo-path-stroke-polygon.c \
cairo-path-stroke-traps.c \
cairo-path-stroke-tristrip.c \
cairo-pattern.c \
cairo-pdf-operators.c \
cairo-pdf-shading.c \
cairo-pen.c \
cairo-png.c \
cairo-polygon.c \
cairo-polygon-intersect.c \
cairo-polygon-reduce.c \
cairo-raster-source-pattern.c \
cairo-recording-surface.c \
cairo-rectangle.c \
cairo-rectangular-scan-converter.c \
cairo-region.c \
cairo-rtree.c \
cairo-scaled-font.c \
cairo-scaled-font-subsets.c \
cairo-script-surface.c \
cairo-shape-mask-compositor.c \
cairo-slope.c \
cairo-spans.c \
cairo-spans-compositor.c \
cairo-spline.c \
cairo-stroke-dash.c \
cairo-stroke-style.c \
cairo-surface.c \
cairo-surface-clipper.c \
cairo-surface-fallback.c \
cairo-surface-offset.c \
cairo-surface-snapshot.c \
cairo-surface-subsurface.c \
cairo-surface-wrapper.c \
cairo-svg-surface.c \
cairo-tor22-scan-converter.c \
cairo-tor-scan-converter.c \
cairo-toy-font-face.c \
cairo-traps.c \
cairo-traps-compositor.c \
cairo-tristrip.c \
cairo-truetype-subset.c \
cairo-type1-fallback.c \
cairo-type1-glyph-names.c \
cairo-type1-subset.c \
cairo-type3-glyph-surface.c \
cairo-unicode.c \
cairo-user-font.c \
cairo-version.c \
cairo-wideint.c \
$(NULL)
SOURCES= $(CAIRO_SOURCES)
OBJECTS = $(patsubst %.c, src/%.o, $(SOURCES))
# targets
all: $(LIBRARY).a $(LIBRARY).dll
$(LIBRARY).a: $(OBJECTS) Makefile
ar cvrs $(LIBRARY).a $(OBJECTS)
mv -f $(LIBRARY).a ../../lib
$(LIBRARY).dll: $(OBJECTS) Makefile
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(OBJECTS) $(LIBS)
$(STRIP) $@
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 $(LIBRARY).dll.a ../../lib
%.o : %.c
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
clean:
-rm -f */*.o

View File

@ -1,142 +1,142 @@
# #
# common bits used by all libraries # common bits used by all libraries
# #
# first so "all" becomes default target # first so "all" becomes default target
all: all-yes all: all-yes
ifndef SUBDIR ifndef SUBDIR
ifndef V ifndef V
Q = @ Q = @
ECHO = printf "$(1)\t%s\n" $(2) ECHO = printf "$(1)\t%s\n" $(2)
BRIEF = CC CXX HOSTCC HOSTLD AS YASM AR LD STRIP CP BRIEF = CC CXX HOSTCC HOSTLD AS YASM AR LD STRIP CP
SILENT = DEPCC DEPHOSTCC DEPAS DEPYASM RANLIB RM SILENT = DEPCC DEPHOSTCC DEPAS DEPYASM RANLIB RM
MSG = $@ MSG = $@
M = @$(call ECHO,$(TAG),$@); M = @$(call ECHO,$(TAG),$@);
$(foreach VAR,$(BRIEF), \ $(foreach VAR,$(BRIEF), \
$(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR)))) $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
$(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR)))) $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL)) $(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
endif endif
ALLFFLIBS = avcodec avdevice avfilter avformat avresample avutil postproc swscale swresample ALLFFLIBS = avcodec avdevice avfilter avformat avresample avutil postproc swscale swresample
# NASM requires -I path terminated with / # NASM requires -I path terminated with /
IFLAGS := -I. -I$(SRC_PATH)/ IFLAGS := -I. -I$(SRC_PATH)/
CPPFLAGS := $(IFLAGS) $(CPPFLAGS) CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
CFLAGS += $(ECFLAGS) CFLAGS += $(ECFLAGS)
CCFLAGS = $(CPPFLAGS) $(CFLAGS) CCFLAGS = $(CPPFLAGS) $(CFLAGS)
ASFLAGS := $(CPPFLAGS) $(ASFLAGS) ASFLAGS := $(CPPFLAGS) $(ASFLAGS)
CXXFLAGS += $(CPPFLAGS) $(CFLAGS) CXXFLAGS += $(CPPFLAGS) $(CFLAGS)
YASMFLAGS += $(IFLAGS:%=%/) -Pconfig.asm YASMFLAGS += $(IFLAGS:%=%/) -Pconfig.asm
HOSTCCFLAGS = $(IFLAGS) $(HOSTCPPFLAGS) $(HOSTCFLAGS) HOSTCCFLAGS = $(IFLAGS) $(HOSTCPPFLAGS) $(HOSTCFLAGS)
LDFLAGS := $(ALLFFLIBS:%=$(LD_PATH)lib%) $(LDFLAGS) LDFLAGS := $(ALLFFLIBS:%=$(LD_PATH)lib%) $(LDFLAGS)
define COMPILE define COMPILE
$(call $(1)DEP,$(1)) $(call $(1)DEP,$(1))
$($(1)) $($(1)FLAGS) $($(1)_DEPFLAGS) $($(1)_C) $($(1)_O) $< $($(1)) $($(1)FLAGS) $($(1)_DEPFLAGS) $($(1)_C) $($(1)_O) $<
endef endef
COMPILE_C = $(call COMPILE,CC) COMPILE_C = $(call COMPILE,CC)
COMPILE_CXX = $(call COMPILE,CXX) COMPILE_CXX = $(call COMPILE,CXX)
COMPILE_S = $(call COMPILE,AS) COMPILE_S = $(call COMPILE,AS)
%.o: %.c %.o: %.c
$(COMPILE_C) $(COMPILE_C)
%.o: %.cpp %.o: %.cpp
$(COMPILE_CXX) $(COMPILE_CXX)
%.s: %.c %.s: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -S -o $@ $< $(CC) $(CPPFLAGS) $(CFLAGS) -S -o $@ $<
%.o: %.S %.o: %.S
$(COMPILE_S) $(COMPILE_S)
%.i: %.c %.i: %.c
$(CC) $(CCFLAGS) $(CC_E) $< $(CC) $(CCFLAGS) $(CC_E) $<
%.h.c: %.h.c:
$(Q)echo '#include "$*.h"' >$@ $(Q)echo '#include "$*.h"' >$@
%.ver: %.v %.ver: %.v
$(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@ $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@
%.c %.h: TAG = GEN %.c %.h: TAG = GEN
# Dummy rule to stop make trying to rebuild removed or renamed headers # Dummy rule to stop make trying to rebuild removed or renamed headers
%.h: %.h:
@: @:
# Disable suffix rules. Most of the builtin rules are suffix rules, # Disable suffix rules. Most of the builtin rules are suffix rules,
# so this saves some time on slow systems. # so this saves some time on slow systems.
.SUFFIXES: .SUFFIXES:
# Do not delete intermediate files from chains of implicit rules # Do not delete intermediate files from chains of implicit rules
$(OBJS): $(OBJS):
endif endif
include $(SRC_PATH)/arch.mak include $(SRC_PATH)/arch.mak
OBJS += $(OBJS-yes) OBJS += $(OBJS-yes)
FFLIBS := $(FFLIBS-yes) $(FFLIBS) FFLIBS := $(FFLIBS-yes) $(FFLIBS)
TESTPROGS += $(TESTPROGS-yes) TESTPROGS += $(TESTPROGS-yes)
LDLIBS = $(FFLIBS:%=%$(BUILDSUF)) LDLIBS = $(FFLIBS:%=%$(BUILDSUF))
FFEXTRALIBS := $(LDLIBS:%=$(LD_LIB)) $(EXTRALIBS) FFEXTRALIBS := $(LDLIBS:%=$(LD_LIB)) $(EXTRALIBS)
EXAMPLES := $(EXAMPLES:%=$(SUBDIR)%-example$(EXESUF)) EXAMPLES := $(EXAMPLES:%=$(SUBDIR)%-example$(EXESUF))
OBJS := $(sort $(OBJS:%=$(SUBDIR)%)) OBJS := $(sort $(OBJS:%=$(SUBDIR)%))
TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o) TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o)
TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF)) TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF))
HOSTOBJS := $(HOSTPROGS:%=$(SUBDIR)%.o) HOSTOBJS := $(HOSTPROGS:%=$(SUBDIR)%.o)
HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF)) HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF))
TOOLS += $(TOOLS-yes) TOOLS += $(TOOLS-yes)
TOOLOBJS := $(TOOLS:%=tools/%.o) TOOLOBJS := $(TOOLS:%=tools/%.o)
TOOLS := $(TOOLS:%=tools/%$(EXESUF)) TOOLS := $(TOOLS:%=tools/%$(EXESUF))
HEADERS += $(HEADERS-yes) HEADERS += $(HEADERS-yes)
PATH_LIBNAME = $(foreach NAME,$(1),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME)) PATH_LIBNAME = $(foreach NAME,$(1),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
DEP_LIBS := $(foreach lib,$(FFLIBS),$(call PATH_LIBNAME,$(lib))) DEP_LIBS := $(foreach lib,$(FFLIBS),$(call PATH_LIBNAME,$(lib)))
SRC_DIR := $(SRC_PATH)/lib$(NAME) SRC_DIR := $(SRC_PATH)/lib$(NAME)
ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h)) ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-) SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-)
SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%) SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
HOBJS = $(filter-out $(SKIPHEADERS:.h=.h.o),$(ALLHEADERS:.h=.h.o)) HOBJS = $(filter-out $(SKIPHEADERS:.h=.h.o),$(ALLHEADERS:.h=.h.o))
checkheaders: $(HOBJS) checkheaders: $(HOBJS)
.SECONDARY: $(HOBJS:.o=.c) .SECONDARY: $(HOBJS:.o=.c)
alltools: $(TOOLS) alltools: $(TOOLS)
$(HOSTOBJS): %.o: %.c $(HOSTOBJS): %.o: %.c
$(call COMPILE,HOSTCC) $(call COMPILE,HOSTCC)
$(HOSTPROGS): %$(HOSTEXESUF): %.o $(HOSTPROGS): %$(HOSTEXESUF): %.o
$(HOSTLD) $(HOSTLDFLAGS) $(HOSTLD_O) $< $(HOSTLIBS) $(HOSTLD) $(HOSTLDFLAGS) $(HOSTLD_O) $< $(HOSTLIBS)
$(OBJS): | $(sort $(dir $(OBJS))) $(OBJS): | $(sort $(dir $(OBJS)))
$(HOBJS): | $(sort $(dir $(HOBJS))) $(HOBJS): | $(sort $(dir $(HOBJS)))
$(HOSTOBJS): | $(sort $(dir $(HOSTOBJS))) $(HOSTOBJS): | $(sort $(dir $(HOSTOBJS)))
$(TESTOBJS): | $(sort $(dir $(TESTOBJS))) $(TESTOBJS): | $(sort $(dir $(TESTOBJS)))
$(TOOLOBJS): | tools $(TOOLOBJS): | tools
OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOBJS) $(HOSTOBJS) $(TESTOBJS)) OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOBJS) $(HOSTOBJS) $(TESTOBJS))
CLEANSUFFIXES = *.d *.o *~ *.h.c *.map *.ver *.ho *.gcno *.gcda CLEANSUFFIXES = *.d *.o *~ *.h.c *.map *.ver *.ho *.gcno *.gcda
DISTCLEANSUFFIXES = *.pc DISTCLEANSUFFIXES = *.pc
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a
define RULES define RULES
clean:: clean::
$(RM) $(OBJS) $(OBJS:.o=.d) $(RM) $(OBJS) $(OBJS:.o=.d)
$(RM) $(HOSTPROGS) $(RM) $(HOSTPROGS)
$(RM) $(TOOLS) $(RM) $(TOOLS)
endef endef
$(eval $(RULES)) $(eval $(RULES))
-include $(wildcard $(OBJS:.o=.d) $(HOSTOBJS:.o=.d) $(TESTOBJS:.o=.d) $(HOBJS:.o=.d)) -include $(wildcard $(OBJS:.o=.d) $(HOSTOBJS:.o=.d) $(TESTOBJS:.o=.d) $(HOBJS:.o=.d))

File diff suppressed because it is too large Load Diff

View File

@ -62,10 +62,15 @@ SOURCES = \
OBJECTS = $(patsubst %.c, %.o, $(SOURCES)) OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
ifeq ($(findstring ebox,$(MAKECMDGOALS)),ebox)
CFLAGS+=-march=pentium-mmx
endif
# targets # targets
all:lib$(LIBRARY).a $(LIBRARY).dll all:lib$(LIBRARY).a $(LIBRARY).dll
ebox:lib$(LIBRARY).a $(LIBRARY).dll
lib$(LIBRARY).a: $(OBJECTS) Makefile lib$(LIBRARY).a: $(OBJECTS) Makefile
ar cvrs lib$(LIBRARY).a $(OBJECTS) ar cvrs lib$(LIBRARY).a $(OBJECTS)

View File

@ -1,90 +0,0 @@
LIBRARY = freetype
CC = gcc
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -march=pentium-mmx -Wall -Winline -fomit-frame-pointer
LD = ld
LDFLAGS = -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --out-implib lib$(LIBRARY).dll.a
STRIP = $(PREFIX)strip
INCLUDES= -I../newlib/include -I./include -I./include/freetype/config
LIBPATH:= -L../../lib
LIBS:= -ldll -lc.dll -lgcc
DEFINES:= -DFT_CONFIG_CONFIG_H="<ftconfig.h>" -DFT_CONFIG_MODULES_H="<ftmodule.h>" -DFT2_BUILD_LIBRARY
SOURCES = \
src/autofit/autofit.c \
src/base/ftbase.c \
src/base/ftbbox.c \
src/base/ftbdf.c \
src/base/ftbitmap.c \
src/base/ftcid.c \
src/base/ftdebug.c \
src/base/ftfstype.c \
src/base/ftgasp.c \
src/base/ftglyph.c \
src/base/ftgxval.c \
src/base/ftinit.c \
src/base/ftlcdfil.c \
src/base/ftmm.c \
src/base/ftotval.c \
src/base/ftpatent.c \
src/base/ftpfr.c \
src/base/ftstroke.c \
src/base/ftsynth.c \
src/base/ftsystem.c \
src/base/fttype1.c \
src/bdf/bdf.c \
src/bzip2/ftbzip2.c \
src/cache/ftcache.c \
src/cff/cff.c \
src/cid/type1cid.c \
src/gzip/ftgzip.c \
src/lzw/ftlzw.c \
src/otvalid/otvalid.c \
src/pcf/pcf.c \
src/pfr/pfr.c \
src/psaux/psaux.c \
src/pshinter/pshinter.c \
src/psnames/psnames.c \
src/raster/raster.c \
src/sfnt/sfnt.c \
src/smooth/smooth.c \
src/truetype/truetype.c \
src/type1/type1.c \
src/type42/type42.c \
src/winfonts/winfnt.c
OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
# targets
all:lib$(LIBRARY).a $(LIBRARY).dll
lib$(LIBRARY).a: $(OBJECTS) Makefile
ar cvrs lib$(LIBRARY).a $(OBJECTS)
mv -f lib$(LIBRARY).a ../../lib
$(LIBRARY).dll: lib$(LIBRARY).def $(OBJECTS) Makefile
$(LD) $(LDFLAGS) $(LIBPATH) -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
%.o : %.c Makefile
$(CC) $(INCLUDES) $(CFLAGS) $(DEFINES) -o $@ $<
clean:
-rm -f *.o

View File

@ -20,11 +20,13 @@ LIBS:= -ldll -lc.dll -lz.dll
DEFS = -DHAVE_CONFIG_H DEFS = -DHAVE_CONFIG_H
LIBPNG_DEFINES = -DPNG_CONFIGURE_LIBPNG LIBPNG_DEFINES = -DPNG_CONFIGURE_LIBPNG
DEFINES= $(DEFS) $(LIBPNG_DEFINES) DEFINES= $(DEFS) $(LIBPNG_DEFINES)
ifeq ($(findstring ebox,$(MAKECMDGOALS)),ebox)
CFLAGS+=-march=pentium-mmx
endif
SOURCES = png.c pngerror.c pngget.c pngmem.c pngpread.c \ SOURCES = png.c pngerror.c pngget.c pngmem.c pngpread.c \
@ -41,6 +43,7 @@ OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
all:$(LIBRARY).a $(LIBRARY).dll all:$(LIBRARY).a $(LIBRARY).dll
ebox:$(LIBRARY).a $(LIBRARY).dll
$(LIBRARY).a: $(OBJECTS) Makefile $(LIBRARY).a: $(OBJECTS) Makefile
ar cvrs $(LIBRARY).a $(OBJECTS) ar cvrs $(LIBRARY).a $(OBJECTS)

View File

@ -53,10 +53,16 @@ SOURCES = \
OBJECTS = $(patsubst %.c, %.o, $(SOURCES)) OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
ifeq ($(findstring ebox,$(MAKECMDGOALS)),ebox)
CFLAGS+=-march=pentium-mmx
endif
# targets # targets
all:$(LIBRARY).a $(LIBRARY).dll all:$(LIBRARY).a $(LIBRARY).dll
ebox:$(LIBRARY).a $(LIBRARY).dll
$(LIBRARY).a: $(OBJECTS) Makefile $(LIBRARY).a: $(OBJECTS) Makefile
ar cvrs $(LIBRARY).a $(OBJECTS) ar cvrs $(LIBRARY).a $(OBJECTS)

View File

@ -13,7 +13,7 @@ IMPLIB = libz.dll.a
PREFIX = PREFIX =
CC = $(PREFIX)gcc CC = $(PREFIX)gcc
CFLAGS = $(LOC) -U_Win32 -U_WIN32 -U__MINGW32__ -O3 -Wall -fomit-frame-pointer CFLAGS = $(LOC) -U_Win32 -U_WIN32 -U__MINGW32__ -O2 -Wall -fomit-frame-pointer
AS = $(CC) AS = $(CC)
ASFLAGS = $(LOC) -Wall ASFLAGS = $(LOC) -Wall
@ -36,6 +36,9 @@ LIBPATH:= -L../../lib
LIBS:= -ldll -lc.dll LIBS:= -ldll -lc.dll
ifeq ($(findstring ebox,$(MAKECMDGOALS)),ebox)
CFLAGS+=-march=pentium-mmx
endif
OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \ OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \
gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
@ -43,6 +46,7 @@ OBJA =
all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) Makefile all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) Makefile
ebox: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) Makefile
.c.o: .c.o:
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $< $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<