Subversion Repositories Kolibri OS

Rev

Rev 5600 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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