Subversion Repositories Kolibri OS

Rev

Rev 8164 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. CC = kos32-gcc
  2. LD = kos32-ld
  3.  
  4. CONTRIB_DIR = $(abspath ../../../contrib)
  5. SDK_DIR = $(CONTRIB_DIR)/sdk
  6. C_LAYER = $(CONTRIB_DIR)/C_Layer
  7.  
  8. CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32
  9. LDFLAGS = -static -S -Tapp-dynamic.lds --image-base 0
  10.  
  11. INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I $(C_LAYER)/INCLUDE
  12. LIBPATH = -L $(SDK_DIR)/lib
  13.  
  14. SOURCES = fridge.c
  15. OBJECTS =  $(patsubst %.c, %.o, $(SOURCES))
  16.  
  17. default: hello
  18.  
  19. hello: $(OBJECTS) Makefile
  20.         $(LD) $(LDFLAGS) $(LIBPATH) --subsystem native -o fridge $(OBJECTS) $(C_LAYER)/OBJ/loadlibimg.obj -lgcc -lc.dll
  21.         strip -s fridge -o fridge
  22.         objcopy fridge -O binary
  23.  
  24. %.o : %.c Makefile $(SOURCES)
  25.         $(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
  26.