Subversion Repositories Kolibri OS

Rev

Rev 5600 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4503 Serge 1
LIBRARY= libeglut
4768 Serge 2
IMPLIB=  libeglut.dll.a
4503 Serge 3
 
4866 Serge 4
CC = kos32-gcc
5
AR = kos32-ar
6
LD = kos32-ld
4768 Serge 7
 
6531 serge 8
INSTALLDIR:= /home/autobuild/tools/win32/lib
9
 
5022 Serge 10
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -fomit-frame-pointer
4503 Serge 11
 
5600 serge 12
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
4503 Serge 13
 
6531 serge 14
LDFLAGS:= -shared -s -T dll.lds --entry _DllStartup --image-base=0
4866 Serge 15
LDFLAGS+= --out-implib $(IMPLIB)
16
 
17
LIBS:=  -ldll -legl.dll -lGL.dll -lc.dll
4503 Serge 18
 
19
DEFINES= -D__unix__ -DMESA_EGL_NO_X11_HEADERS
20
 
21
 
22
SOURCES = eglut.c	\
4768 Serge 23
	  eglut_screen.c\
24
	  render.c	\
25
	  swap.c
4503 Serge 26
 
27
 
28
OBJECTS =  $(patsubst %.c, %.o, $(SOURCES))
29
 
30
 
31
# targets
32
 
33
 
4768 Serge 34
all:$(LIBRARY).a $(LIBRARY).dll
4503 Serge 35
 
36
$(LIBRARY).a: $(OBJECTS) Makefile
4866 Serge 37
	$(AR) crs $(LIBRARY).a $(OBJECTS)
6531 serge 38
	mv -f $(LIBRARY).a $(INSTALLDIR)
4503 Serge 39
 
4768 Serge 40
$(LIBRARY).dll: $(OBJECTS) Makefile
6531 serge 41
	$(LD) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
4768 Serge 42
	mv -f $(LIBRARY).dll ../../bin
6531 serge 43
	mv -f $(IMPLIB) $(INSTALLDIR)
4768 Serge 44
 
45
%.o : %.c Makefile eglut.h eglutint.h render.h
4503 Serge 46
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
47
 
48
clean:
49
	-rm -f *.o
50
 
51
 
52