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
|
|
|
|
|
|
|
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fomit-frame-pointer
|
|
|
|
|
2014-05-21 22:47:51 +02:00
|
|
|
INCLUDES= -I. -I../newlib/libc/include -I../Mesa/include -I../Mesa/src/gbm/main -I../libdrm/include
|
2014-01-21 17:30:49 +01:00
|
|
|
|
2014-05-21 22:47:51 +02:00
|
|
|
LDFLAGS:= -shared -s -nostdlib -T ../newlib/libc/dll.lds --entry _DllStartup --image-base=0
|
2014-04-21 19:06:44 +02:00
|
|
|
LDFLAGS+= --out-implib $(IMPLIB)
|
|
|
|
|
2014-01-21 17:30:49 +01:00
|
|
|
LIBPATH:= -L../../lib
|
2014-04-21 19:06:44 +02:00
|
|
|
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)
|
2014-01-21 17:30:49 +01:00
|
|
|
mv -f $(LIBRARY).a ../../lib
|
|
|
|
|
2014-04-04 23:41:12 +02:00
|
|
|
$(LIBRARY).dll: $(OBJECTS) Makefile
|
|
|
|
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(OBJECTS) $(LIBS)
|
|
|
|
mv -f $(LIBRARY).dll ../../bin
|
|
|
|
mv -f $(IMPLIB) ../../lib
|
|
|
|
|
|
|
|
%.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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|