Subversion Repositories Kolibri OS

Rev

Rev 225 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. INCLUDE = include
  2. LIBSFORBUILD = math
  3. LIBNAME = libck.a
  4. CC = gcc
  5. CFLAGS = -I$(INCLUDE) -nostdinc -DGNUC  -L./ -lm
  6. DIRS := stdio kolibrisys string stdlib memory math
  7.  
  8. ##############################################################
  9. #files := $(foreach dir,$(DIRS),$(dir)/$(wildcard $(dir)/*))
  10. asmfiles := $(foreach dir,$(DIRS),$(patsubst %.asm, %.o, $(wildcard $(dir)/*.asm)))
  11. cfiles := $(foreach dir,$(DIRS),$(patsubst %.c, %.o, $(wildcard $(dir)/*.c)))
  12.  
  13. .PHONY: clean all
  14.  
  15. ifdef windir
  16. doClean = del /F /Q $(subst /,\,$(cfiles)) $(subst /,\,$(asmfiles))
  17. else
  18. doClean = rm $(cfiles) $(asmfiles)
  19. endif
  20.  
  21. all: $(cfiles) $(asmfiles)
  22.         ar -ru $(LIBNAME) $^
  23.  
  24. $(cfiles): $(INCLUDE)/*.h
  25.  
  26. $(asmfiles):
  27.         fasm $*.asm $*.o
  28.  
  29. clean:
  30.         $(doClean)
  31.