kolibrios-gitea/programs/develop/ktcc/trunk/libc/Makefile
superturbocat2001 5941f0e334 - Added 4 functions to libck: getcwd, setcwd, mkdir, rmdir.
- Fixed Makefile for building "libck" under tcc. 
- Added example to new functions

git-svn-id: svn://kolibrios.org@8280 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-11-29 22:05:50 +00:00

34 lines
831 B
Makefile

INCLUDE = include
LIBSFORBUILD = math
LIBNAME = libck.a
CC = ../bin/kos32-tcc
CFLAGS = -I$(INCLUDE) -m32 -nostdinc -nostdlib -DGNUC
DIRS := stdio memory kolibrisys string stdlib math dlfcn libgen fs
##############################################################
#files := $(foreach dir,$(DIRS),$(dir)/$(wildcard $(dir)/*))
asmfiles := $(foreach dir,$(DIRS),$(patsubst %.asm, %.o, $(wildcard $(dir)/*.asm)))
cfiles := $(foreach dir,$(DIRS),$(patsubst %.c, %.o, $(wildcard $(dir)/*.c)))
.PHONY: clean all
ifdef windir
doClean = del /F /Q $(subst /,\,$(cfiles)) $(subst /,\,$(asmfiles))
else
doClean = rm $(cfiles) $(asmfiles)
endif
all: $(cfiles) $(asmfiles)
ar -ru $(LIBNAME) $^
$(cfiles): $(INCLUDE)/*.h
$(asmfiles):
fasm $*.asm $*.o
clean:
$(doClean)
install:
cp $(LIBNAME) ../bin/lib