Subversion Repositories Kolibri OS

Rev

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

  1. CC = kos32-gcc
  2. LD = kos32-ld
  3.  
  4. SDK_DIR = $(abspath ../../../../sdk)
  5.  
  6. CFLAGS = -c -fno-ident -O2 -fomit-frame-pointer -fno-ident -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -DSQLITE_OS_OTHER=1 -DHAVE_UNISTD_H=0 -DSQLITE_OMIT_POPEN -DSQLITE_THREADSAFE=0 -D_KOLIBRI -U__linux__ -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.36.0\" -DPACKAGE_STRING=\"sqlite\ 3.36.0\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.36.0\"
  7. LDFLAGS = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app.lds --image-base 0
  8.  
  9. INCLUDES = -I $(SDK_DIR)/sources/newlib/libc/include -I..
  10. LIBPATH = -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib -L..
  11.  
  12.  
  13. # Only selected
  14. SRC =  test.c stub.c
  15. # All .c files
  16. # SRC = $(notdir $(wildcard *.c))
  17.  
  18. OBJECTS = $(patsubst %.c, %.o, $(SRC))
  19.  
  20. default: $(patsubst %.c,%.o,$(SRC))
  21.         kos32-ld $(LDFLAGS) $(LIBPATH) --subsystem console -o slite3_shell $(OBJECTS) -lgcc -lsqlite3.dll -lc.dll
  22.         strip -S slite3_shell
  23.         objcopy slite3_shell -O binary
  24.  
  25. %.o : %.c Makefile $(SRC)
  26.         $(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
  27.  
  28. clean:
  29.         rm *.o
  30.