kolibrios/contrib/sdk/sources/pixlib-3/Makefile

56 lines
1.3 KiB
Makefile
Raw Normal View History

LIBRARY= pixlib3
CC = kos32-gcc
AR = kos32-ar
LD = kos32-ld
STRIP = kos32-strip
ARFLAGS = crs
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -fomit-frame-pointer
LDFLAGS:= -shared -s -nostdlib -Map px.map -T ../newlib/dll.lds --entry _DllStartup --image-base=0
LDFLAGS+= --file-alignment 256
INCLUDES= -I. -I../newlib/libc/include
PXGL_INCLUDES= $(INCLUDES) -I../libdrm/intel -I../libdrm/include
PXGL_INCLUDES+= -I ../Mesa/include -I../Mesa/src/gbm/main
LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib
LIBS:= -ldll -legl.dll -lGL.dll -lc.dll -lgcc
#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)
mv -f lib$(LIBRARY).a ../../lib
pixlib-gl.dll: $(OBJ_PXGL) Makefile
$(LD) $(LDFLAGS) $(PXFLAGS) $(LIBPATH) -o $@ $(OBJ_PXGL) $(LIBS)
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