CC=gcc
CFLAGS=-Wall -g -O0
LDFLAGS=-static -lm

.PHONY: default
default: bin/memcp

bin/memcp: build/memcp.o build/filelist.o build/fileread.o
	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)

build/%.o: %.c %.h
	-mkdir -p build
	$(CC) $(CFLAGS) -c -o $@ $(word 1, $^)

.PHONY: clean
clean:
	rm -r build/*
