Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
5069 serge 1
CC = kos32-gcc
2
AR = kos32-ar
3
LD = kos32-ld
8498 maxcodehac 4
CPP = kos32-g++
5069 serge 5
STRIP = kos32-strip
6
 
7
CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -fomit-frame-pointer
8
 
9
ARFLAG = crs
10
 
8498 maxcodehac 11
SDK_DIR = $(abspath ../../..)
12
LIB_DIR = $(SDK_DIR)/lib
5069 serge 13
 
14
DEFINES = -D__unix__ -DMESA_EGL_NO_X11_HEADERS
15
 
8498 maxcodehac 16
INCLUDES = -I. -I$(SDK_DIR)/sources/newlib/libc/include -I$(SDK_DIR)/sources/Mesa/mesa-9.2.5/include -I$(SDK_DIR)/sources/eglut
5069 serge 17
 
8498 maxcodehac 18
LIBS_EGL = -leglut -legl.dll
19
LIBS_OSM = -losmesa.dll
20
LIBS = -lGL.dll -lpixlib3 -lgcc -lc.dll
5069 serge 21
 
8498 maxcodehac 22
LIBPATH = -L$(LIB_DIR) -L/home/autobuild/tools/win32/mingw32/lib
5069 serge 23
 
8498 maxcodehac 24
LDFLAGS = -static -nostdlib --stack 0x200000 -T$(SDK_DIR)/sources/newlib/app.lds --image-base 0 --subsystem native
5069 serge 25
 
8498 maxcodehac 26
SOURCES = gears.c				\
5069 serge 27
		eglgears.c			\
28
		osgears.c
29
 
30
OBJECTS =  $(patsubst %.asm, %.o, $(patsubst %.c, %.o, $(SOURCES)))
31
 
32
 
33
# targets
34
 
35
all: demos
36
 
37
demos: eglgears osgears
38
 
39
eglgears: gears.o eglgears.o Makefile
40
	$(LD) $(LDFLAGS) $(LIBPATH) -o $@ gears.o eglgears.o $(LIBS_EGL) $(LIBS)
41
	kos32-objcopy $@ -O binary
42
 
43
osgears: gears.o osgears.o Makefile
44
	$(LD) $(LDFLAGS) $(LIBPATH) -o $@ gears.o osgears.o $(LIBS_OSM) $(LIBS)
45
	kos32-objcopy $@ -O binary
46
 
47
%.o : %.c Makefile
48
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $<
49
 
50
clean:
51
	-rm -f *.o
52
 
53
 
54