Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. [target]
  2. programs=example ray
  3.  
  4. [default]
  5. target=win32
  6. cpu=i386
  7.  
  8. [compiler]
  9. options=-dKOLIBRI
  10. unittargetdir=build
  11. targetdir=bin
  12. sourcedir=src
  13.  
  14. [prerules]
  15. ifdef KFPCDIR
  16. override KFPCDIR:=$(subst \,/,$(KFPCDIR))
  17. ifeq ($(wildcard $(KFPCDIR)/bin),)
  18. override KFPCDIR=wrong
  19. endif
  20. else
  21. override KFPCDIR=wrong
  22. endif
  23.  
  24. ifeq ($(KFPCDIR),wrong)
  25. $(error The KFPCDIR environment is wrong)
  26. endif
  27.  
  28. #UNITSDIR:=$(wildcard $(FPCDIR)/units/$(CPU_TARGET)-kolibri)
  29. UNITSDIR:=$(wildcard $(KFPCDIR)/units)
  30. KOSEXT=.kex
  31. EXE2KEX=$(KFPCDIR)/bin/exe2kos
  32.  
  33. [rules]
  34. ifneq ($(TARGET_PROGRAMS),)
  35. KOSFILES=$(addsuffix $(KOSEXT),$(TARGET_PROGRAMS))
  36. endif
  37.  
  38. fpc_all: $(KOSFILES)
  39.  
  40. %$(KOSEXT): %$(EXEEXT)
  41.         @$(EXE2KEX) $(COMPILER_TARGETDIR)/$^ $(COMPILER_TARGETDIR)/$@
  42.         @$(DEL) $(COMPILER_TARGETDIR)/$^
  43.