Subversion Repositories Kolibri OS

Rev

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

  1. CC = kos32-gcc
  2. LD = kos32-ld
  3.  
  4. SDK_DIR:= $(abspath ../..)
  5.  
  6. LDFLAGS = -static -Tapp-static.lds
  7.  
  8. CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32
  9.  
  10. INCLUDES= -I $(SDK_DIR)/sources/newlib/libc/include
  11. LIBPATH:= -L $(SDK_DIR)/lib
  12.  
  13. SOURCES = hello.c       \
  14.           $(NULL)
  15.  
  16.  
  17. OBJECTS =  $(patsubst %.c, %.o, $(SOURCES))
  18.  
  19. default: hello
  20.  
  21. hello: $(OBJECTS) Makefile.static
  22.         $(LD) $(LDFLAGS) $(LIBPATH) -Map hello.map -o hello $(OBJECTS) -lc -lgcc -lc
  23.         objcopy hello -O binary
  24.  
  25. %.o : %.c Makefile.static $(SOURCES)
  26.         $(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
  27.