2015-01-15 06:49:40 +01:00
|
|
|
LIBRARY= pixlib3
|
|
|
|
|
|
|
|
CC = kos32-gcc
|
|
|
|
AR = kos32-ar
|
|
|
|
LD = kos32-ld
|
|
|
|
STRIP = kos32-strip
|
|
|
|
|
2016-11-04 07:36:45 +01:00
|
|
|
INSTALLDIR:= /home/autobuild/tools/win32/lib
|
|
|
|
|
2015-01-15 06:49:40 +01:00
|
|
|
ARFLAGS = crs
|
|
|
|
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -fomit-frame-pointer
|
2016-11-04 07:36:45 +01:00
|
|
|
LDFLAGS:= -shared -s -Map px.map -T dll.lds --entry _DllStartup --image-base=0
|
2015-01-15 06:49:40 +01:00
|
|
|
LDFLAGS+= --file-alignment 256
|
|
|
|
|
|
|
|
INCLUDES= -I. -I../newlib/libc/include
|
|
|
|
|
|
|
|
PXGL_INCLUDES= $(INCLUDES) -I../libdrm/intel -I../libdrm/include
|
2015-07-23 12:24:13 +02:00
|
|
|
PXGL_INCLUDES+= -I ../Mesa/mesa-9.2.5/include -I../Mesa/mesa-9.2.5/src/gbm/main
|
2015-01-15 06:49:40 +01:00
|
|
|
|
2016-11-04 07:36:45 +01:00
|
|
|
LIBS:= -ldll -legl.dll -lGL.dll -lgcc -lc.dll
|
2015-01-15 06:49:40 +01:00
|
|
|
#LIBS+= -ldrm.dll
|
|
|
|
|
|
|
|
DEFINES:= -DNDEBUG
|
|
|
|
PXGL_DEFINES:= $(DEFINES) -D__unix__ -DMESA_EGL_NO_X11_HEADERS
|
|
|
|
|
|
|
|
SRC_PIXLIB = pixlib3.c
|
|
|
|
SRC_PXGL = egl.c pxgl.c
|
|
|
|
|
|
|
|
OBJ_PIXLIB = $(patsubst %.c, %.o, $(SRC_PIXLIB))
|
|
|
|
OBJ_PXGL = $(patsubst %.c, %.o, $(SRC_PXGL))
|
|
|
|
|
|
|
|
# targets
|
|
|
|
|
|
|
|
all: lib$(LIBRARY).a pixlib-gl.dll
|
|
|
|
|
|
|
|
lib$(LIBRARY).a: $(OBJ_PIXLIB) Makefile
|
|
|
|
$(AR) $(ARFLAGS) lib$(LIBRARY).a $(OBJ_PIXLIB)
|
2016-11-04 07:36:45 +01:00
|
|
|
mv -f lib$(LIBRARY).a $(INSTALLDIR)
|
2015-01-15 06:49:40 +01:00
|
|
|
|
|
|
|
pixlib-gl.dll: $(OBJ_PXGL) Makefile
|
2016-11-04 07:36:45 +01:00
|
|
|
$(LD) $(LDFLAGS) $(PXFLAGS) -o $@ $(OBJ_PXGL) $(LIBS)
|
2015-01-15 06:49:40 +01:00
|
|
|
mv -f $@ ../../bin
|
|
|
|
|
|
|
|
pixlib3.o : pixlib3.c Makefile
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
|
|
|
|
|
|
|
|
%.o : %.c Makefile
|
|
|
|
$(CC) $(CFLAGS) $(PXGL_DEFINES) $(PXGL_INCLUDES) -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f *.o
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|