mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-14 10:57:08 +03:00
818c477d6f
git-svn-id: svn://kolibrios.org@8315 a494cfbc-eb01-0410-851d-a64ba20cac60
34 lines
836 B
Makefile
34 lines
836 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 net
|
|
|
|
##############################################################
|
|
#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 -rcs $(LIBNAME) $^
|
|
|
|
$(cfiles): $(INCLUDE)/*.h
|
|
|
|
$(asmfiles):
|
|
fasm $*.asm $*.o
|
|
|
|
clean:
|
|
$(doClean)
|
|
|
|
install:
|
|
cp $(LIBNAME) ../bin/lib
|