2013-12-17 13:47:01 +01:00
|
|
|
LIBRARY= pixlib
|
|
|
|
|
2014-04-21 19:06:44 +02:00
|
|
|
CC = kos32-gcc
|
|
|
|
AR = kos32-ar
|
|
|
|
LD = kos32-ld
|
|
|
|
STRIP = kos32-strip
|
2013-12-17 13:47:01 +01:00
|
|
|
|
2014-08-07 13:48:01 +02:00
|
|
|
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -fomit-frame-pointer
|
2013-12-17 13:47:01 +01:00
|
|
|
|
|
|
|
LDFLAGS:= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0
|
2014-04-21 19:06:44 +02:00
|
|
|
PXFLAGS:= --version-script pixlib.ver --out-implib $(LIBRARY).dll.a
|
2013-12-17 13:47:01 +01:00
|
|
|
SNAFLAGS:= --version-script sna.ver --output-def sna.def
|
2014-01-21 15:20:59 +01:00
|
|
|
UXAFLAGS:= --version-script uxa.ver --output-def uxa.def
|
2013-12-17 13:47:01 +01:00
|
|
|
|
2014-05-21 22:47:51 +02:00
|
|
|
INCLUDES= -I. -I../libdrm/intel -I../libdrm/include/drm -I./render_program -I../pixman -I../newlib/libc/include
|
2013-12-17 13:47:01 +01:00
|
|
|
|
|
|
|
LIBPATH:= -L../../lib
|
|
|
|
|
|
|
|
LIBS:= -ldll -lc.dll
|
|
|
|
|
|
|
|
DEFINES:= -DHAS_DEBUG_FULL=0 -DSHOW_BATCH=0 -DDEBUG_DUMP=0
|
|
|
|
|
|
|
|
SRC_PIXLIB = pixlib.c
|
|
|
|
|
2014-01-21 15:20:59 +01:00
|
|
|
SRC_SNA = \
|
|
|
|
sna/gen4_common.c \
|
|
|
|
sna/gen6_common.c \
|
|
|
|
sna/gen3_render.c \
|
2013-12-17 13:47:01 +01:00
|
|
|
sna/gen4_render.c \
|
|
|
|
sna/gen4_vertex.c \
|
|
|
|
sna/gen5_render.c \
|
|
|
|
sna/gen6_render.c \
|
|
|
|
sna/gen7_render.c \
|
|
|
|
sna/kgem.c \
|
|
|
|
sna/sna.c \
|
|
|
|
sna/sna_cpu.c \
|
|
|
|
sna/sna_stream.c \
|
|
|
|
sna/sna_transform.c \
|
|
|
|
sna/utils.c \
|
|
|
|
sna/brw/brw_eu.c \
|
|
|
|
sna/brw/brw_eu_emit.c \
|
|
|
|
sna/brw/brw_sf.c \
|
|
|
|
sna/brw/brw_wm.c
|
|
|
|
|
|
|
|
SRC_UXA = pixlib_uxa.c \
|
|
|
|
uxa/uxa.c \
|
|
|
|
uxa/i965_3d.c \
|
|
|
|
uxa/i965_render.c \
|
|
|
|
uxa/intel_batchbuffer.c
|
|
|
|
|
|
|
|
OBJ_PIXLIB = $(patsubst %.c, %.o, $(SRC_PIXLIB))
|
|
|
|
OBJ_UXA = $(patsubst %.c, %.o, $(SRC_UXA))
|
|
|
|
OBJ_SNA = $(patsubst %.c, %.o, $(SRC_SNA))
|
|
|
|
|
|
|
|
ifeq ($(findstring ebox,$(MAKECMDGOALS)),ebox)
|
|
|
|
CFLAGS+=-march=pentium-mmx
|
|
|
|
DEFINES+= -DBUILD_EBOX
|
|
|
|
else
|
|
|
|
LIBS+= -ldrm.dll
|
|
|
|
ifeq ($(findstring uxa,$(MAKECMDGOALS)),uxa)
|
|
|
|
OBJECTS= $(OBJ_UXA)
|
|
|
|
DEFINES+= -DBUILD_UXA
|
|
|
|
else
|
|
|
|
OBJECTS= $(OBJ_SNA)
|
|
|
|
DEFINES+= -DBUILD_SNA
|
|
|
|
LIBS+= -lgcc
|
2014-04-21 19:06:44 +02:00
|
|
|
LIBPATH+= -L/home/autobuild/tools/win32/mingw32/lib
|
2013-12-17 13:47:01 +01:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# targets
|
|
|
|
|
2013-12-19 05:21:53 +01:00
|
|
|
all:$(LIBRARY).dll intel-sna.drv
|
2014-01-21 15:20:59 +01:00
|
|
|
uxa:$(LIBRARY).dll intel-uxa.drv
|
2013-12-17 13:47:01 +01:00
|
|
|
ebox:$(LIBRARY).dll
|
|
|
|
|
|
|
|
|
|
|
|
$(LIBRARY).dll: $(OBJ_PIXLIB) Makefile
|
|
|
|
$(LD) $(LDFLAGS) $(PXFLAGS) $(LIBPATH) -o $@ $(OBJ_PIXLIB) $(LIBS)
|
|
|
|
mv -f $@ ../../bin
|
|
|
|
mv -f $(LIBRARY).dll.a ../../lib
|
|
|
|
|
|
|
|
intel-sna.drv: $(OBJ_SNA) Makefile
|
|
|
|
$(LD) $(LDFLAGS) $(SNAFLAGS) $(LIBPATH) -o $@ $(OBJ_SNA) $(LIBS)
|
|
|
|
mv -f $@ ../../bin
|
|
|
|
|
|
|
|
intel-uxa.drv: $(OBJ_UXA) Makefile
|
2014-01-21 15:20:59 +01:00
|
|
|
$(LD) $(LDFLAGS) $(UXAFLAGS) $(LIBPATH) -o $@ $(OBJ_UXA) $(LIBS)
|
2013-12-17 13:47:01 +01:00
|
|
|
$(STRIP) $@
|
|
|
|
mv -f $@ ../../bin
|
|
|
|
|
|
|
|
%.o : %.c Makefile
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f *.o
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|