2013-12-15 17:26:11 +04:00
|
|
|
LIBRARY= libdrm
|
|
|
|
|
2014-04-21 21:06:44 +04:00
|
|
|
CC = kos32-gcc
|
|
|
|
AR = kos32-ar
|
|
|
|
LD = kos32-ld
|
|
|
|
STRIP = kos32-strip
|
|
|
|
|
|
|
|
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -march=i686 -O2 -fomit-frame-pointer
|
2013-12-15 17:26:11 +04:00
|
|
|
|
2014-04-21 21:06:44 +04:00
|
|
|
LDFLAGS:= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --version-script libdrm.ver --image-base=0
|
|
|
|
LDFLAGS+= --out-implib $(LIBRARY).dll.a
|
2013-12-15 17:26:11 +04:00
|
|
|
|
2014-04-21 21:06:44 +04:00
|
|
|
ARFLAGS = crs
|
2013-12-15 17:26:11 +04:00
|
|
|
|
|
|
|
INCLUDES= -I. -I./include/drm -I../newlib/include
|
|
|
|
|
2014-04-21 21:06:44 +04:00
|
|
|
LIBPATH:= -L../../lib -L/home/autobuild/tools/win32/mingw32/lib
|
2013-12-15 17:26:11 +04:00
|
|
|
|
|
|
|
LIBS:= -ldll -lc.dll
|
|
|
|
|
|
|
|
DEFINES=
|
|
|
|
|
|
|
|
SOURCES = xf86drm.c \
|
|
|
|
intel/intel_bufmgr.c \
|
|
|
|
intel/intel_bufmgr_gem.c
|
|
|
|
|
|
|
|
OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
|
|
|
|
|
|
|
|
# targets
|
|
|
|
|
|
|
|
all:$(LIBRARY).a $(LIBRARY).dll
|
|
|
|
|
|
|
|
|
|
|
|
$(LIBRARY).a: $(OBJECTS) Makefile
|
2014-04-21 21:06:44 +04:00
|
|
|
$(AR) $(ARFLAGS) $(LIBRARY).a $(OBJECTS)
|
2013-12-15 17:26:11 +04:00
|
|
|
mv -f $(LIBRARY).a ../../lib
|
|
|
|
|
|
|
|
$(LIBRARY).dll: $(OBJECTS) Makefile
|
|
|
|
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(OBJECTS) $(LIBS)
|
|
|
|
mv -f $@ ../../bin
|
|
|
|
mv -f $(LIBRARY).dll.a ../../lib
|
|
|
|
|
|
|
|
%.o : %.c Makefile
|
|
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f *.o
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|