summaryrefslogblamecommitdiff
path: root/zap/Makefile
blob: b7db3dc12799fff5f2cba6395020cf62d5c6025c (plain) (tree)































































                                                              
# TOOLS

#CC = clang
#CC = gcc

# TOOL FLAGS

CFLAGS = \
	-Iinclude \
	-Iinclude-priv \
	-O3 \
	-fPIC \
	-g \
	-march=native \
	-std=c99 \
	-Wall \
	-Wextra \
	-Wpedantic

# ARTIFACTS

OBJS = \
	src/abs.o \
	src/fastimpl.o \
	src/fma.o \
	src/fndbyte.o \
	src/fndchr.o \
	src/foreach.o \
	src/memcmp.o \
	src/memcpy.o \
	src/memdup.o \
	src/memeq.o \
	src/memfill.o \
	src/strcmp.o \
	src/strdup.o \
	src/streq.o \
	src/strfill.o \
	src/strcpy.o \
	src/strlen.o

LIB = libzap.a

# OPTIONS

# Uncomment to disable assembly algorithms:
#CFLAGS += -Dzap_priv_noasm

# Uncomment to enable freestanding mode (requries no runtime):
#CFLAGS += \
	-Dzap_priv_nostdlib \
	-ffreestanding

# TARGETS

.PHONY: clean purge

$(LIB): $(OBJS)
	ar r $@ $(OBJS)

clean:
	rm -fr $(OBJS)

purge: clean
	rm -fr $(LIB)