2014-01-21 17:30:49 +01:00
|
|
|
|
|
|
|
LIBRARY= libeglut
|
2014-04-04 23:41:12 +02:00
|
|
|
IMPLIB= libeglut.dll.a
|
|
|
|
|
2014-01-21 17:30:49 +01:00
|
|
|
|
|
|
|
CC=gcc
|
|
|
|
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fomit-frame-pointer
|
|
|
|
|
|
|
|
AR= ar
|
|
|
|
|
2014-04-04 23:41:12 +02:00
|
|
|
INCLUDES= -I. -I../newlib/include -I../Mesa/include -I../Mesa/src/gbm/main -I../libdrm/include
|
2014-01-21 17:30:49 +01:00
|
|
|
|
2014-04-04 23:41:12 +02:00
|
|
|
LDFLAGS:= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --out-implib $(IMPLIB)
|
2014-01-21 17:30:49 +01:00
|
|
|
LIBPATH:= -L../../lib
|
2014-04-04 23:41:12 +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
|
|
|
|
ar cvrs $(LIBRARY).a $(OBJECTS)
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|