2014-01-21 17:30:49 +01:00
|
|
|
LIBRARY= libeglut
|
2014-04-04 23:41:12 +02:00
|
|
|
IMPLIB= libeglut.dll.a
|
|
|
|
|
2014-04-21 19:06:44 +02:00
|
|
|
CC = kos32-gcc
|
|
|
|
AR = kos32-ar
|
|
|
|
LD = kos32-ld
|
2014-01-21 17:30:49 +01:00
|
|
|
|
2016-09-22 18:14:35 +02:00
|
|
|
INSTALLDIR:= /home/autobuild/tools/win32/lib
|
|
|
|
|
2014-08-07 13:48:01 +02:00
|
|
|
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -fomit-frame-pointer
|
2014-01-21 17:30:49 +01:00
|
|
|
|
2015-07-23 12:04:00 +02:00
|
|
|
INCLUDES= -I. -I../newlib/libc/include -I../Mesa/mesa-9.2.5/include -I../Mesa/mesa-9.2.5/src/gbm/main -I../libdrm/include
|
2014-01-21 17:30:49 +01:00
|
|
|
|
2016-09-22 18:14:35 +02:00
|
|
|
LDFLAGS:= -shared -s -T dll.lds --entry _DllStartup --image-base=0
|
2014-04-21 19:06:44 +02:00
|
|
|
LDFLAGS+= --out-implib $(IMPLIB)
|
|
|
|
|
|
|
|
LIBS:= -ldll -legl.dll -lGL.dll -lc.dll
|
2014-01-21 17:30:49 +01:00
|
|
|
|
|
|
|
DEFINES= -D__unix__ -DMESA_EGL_NO_X11_HEADERS
|
|
|
|
|
|
|
|
|
|
|
|
SOURCES = eglut.c \
|
2014-04-04 23:41:12 +02:00
|
|
|
eglut_screen.c\
|
|
|
|
render.c \
|
|
|
|
swap.c
|
2014-01-21 17:30:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
OBJECTS = $(patsubst %.c, %.o, $(SOURCES))
|
|
|
|
|
|
|
|
|
|
|
|
# targets
|
|
|
|
|
|
|
|
|
2014-04-04 23:41:12 +02:00
|
|
|
all:$(LIBRARY).a $(LIBRARY).dll
|
2014-01-21 17:30:49 +01:00
|
|
|
|
|
|
|
$(LIBRARY).a: $(OBJECTS) Makefile
|
2014-04-21 19:06:44 +02:00
|
|
|
$(AR) crs $(LIBRARY).a $(OBJECTS)
|
2016-09-22 18:14:35 +02:00
|
|
|
mv -f $(LIBRARY).a $(INSTALLDIR)
|
2014-01-21 17:30:49 +01:00
|
|
|
|
2014-04-04 23:41:12 +02:00
|
|
|
$(LIBRARY).dll: $(OBJECTS) Makefile
|
2016-09-22 18:14:35 +02:00
|
|
|
$(LD) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
|
2014-04-04 23:41:12 +02:00
|
|
|
mv -f $(LIBRARY).dll ../../bin
|
2016-09-22 18:14:35 +02:00
|
|
|
mv -f $(IMPLIB) $(INSTALLDIR)
|
2014-04-04 23:41:12 +02:00
|
|
|
|
|
|
|
%.o : %.c Makefile eglut.h eglutint.h render.h
|
2014-01-21 17:30:49 +01:00
|
|
|
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f *.o
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|