kolibrios/programs/develop/metcc/trunk/libc/makefile
victor 7d89df5d1b блабла
git-svn-id: svn://kolibrios.org@225 a494cfbc-eb01-0410-851d-a64ba20cac60
2006-12-01 10:55:54 +00:00

30 lines
708 B
Makefile

INCLUDE = include
LIBNAME = melibc.a
CC = gcc
CFLAGS = -I$(INCLUDE) -nostdinc -DGNUC
DIRS := file mesys string mem
##############################################################
#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)