Subversion Repositories Kolibri OS

Rev

Rev 8124 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. CC = kos32-gcc
  2. AR = kos32-ar
  3. LD = kos32-ld
  4. CPP= kos32-g++
  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.  
  11. SDK_DIR:= $(abspath ../../..)
  12. LIB_DIR:= $(SDK_DIR)/lib
  13.  
  14. DEFINES = -D__unix__ -DMESA_EGL_NO_X11_HEADERS
  15.  
  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
  17.  
  18. LIBS_EGL:= -leglut -legl.dll
  19. LIBS_OSM:= -losmesa.dll
  20. LIBS:= -lGL.dll -lpixlib3 -lgcc -lc.dll
  21.  
  22. LIBPATH:= -L$(LIB_DIR) -L/home/autobuild/tools/win32/mingw32/lib
  23.  
  24. LDFLAGS = -static -nostdlib --stack 0x200000 -T$(SDK_DIR)/sources/newlib/app.lds --image-base 0
  25.  
  26. SOURCES =       gears.c                         \
  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.  
  55.  
  56.