2006-11-28 01:23:25 +01:00
|
|
|
INCLUDE = include
|
2007-10-15 11:42:17 +02:00
|
|
|
LIBSFORBUILD = math
|
|
|
|
LIBNAME = libck.a
|
2020-11-29 23:05:50 +01:00
|
|
|
CC = ../bin/kos32-tcc
|
2008-01-14 20:33:34 +01:00
|
|
|
CFLAGS = -I$(INCLUDE) -m32 -nostdinc -nostdlib -DGNUC
|
2020-12-03 18:27:05 +01:00
|
|
|
DIRS := stdio memory kolibrisys string stdlib math dlfcn libgen fs net
|
2006-11-28 01:23:25 +01:00
|
|
|
|
|
|
|
##############################################################
|
|
|
|
#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
|
|
|
|
|
2006-12-01 11:55:54 +01:00
|
|
|
ifdef windir
|
|
|
|
doClean = del /F /Q $(subst /,\,$(cfiles)) $(subst /,\,$(asmfiles))
|
|
|
|
else
|
|
|
|
doClean = rm $(cfiles) $(asmfiles)
|
|
|
|
endif
|
|
|
|
|
2006-11-28 01:23:25 +01:00
|
|
|
all: $(cfiles) $(asmfiles)
|
2020-12-03 18:27:05 +01:00
|
|
|
ar -rcs $(LIBNAME) $^
|
2006-11-28 01:23:25 +01:00
|
|
|
|
|
|
|
$(cfiles): $(INCLUDE)/*.h
|
|
|
|
|
|
|
|
$(asmfiles):
|
|
|
|
fasm $*.asm $*.o
|
|
|
|
|
|
|
|
clean:
|
2006-12-01 11:55:54 +01:00
|
|
|
$(doClean)
|
2020-11-29 23:05:50 +01:00
|
|
|
|
|
|
|
install:
|
|
|
|
cp $(LIBNAME) ../bin/lib
|