Subversion Repositories Kolibri OS

Rev

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

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