shithub: neoventi

ref: 4b60d3dd32efd00a1d07cb08662926ba9836719f
dir: /Makefile/

View raw version
.PHONY:all

CC=cproc
CFLAGS=-std=c17 -pedantic -Wall -O1 -g -D _POSIX_C_SOURCE=200809 -Werror -Wextra -I. -Icore
LDFLAGS=-lplatform

all:bin/neoventi bin/vpart

bin/vpart: bin/partitioner/main.o bin/partitioner/linux.o
	@mkdir -p bin
	@echo LD $@
	@$(CC) -o $@ $^ -lrt $(CFLAGS) $(LDFLAGS)

bin/neoventi: bin/venti/main.o bin/venti/config.o bin/venti/utils.o
	@mkdir -p bin
	@echo LD $@
	@$(CC) -o $@ $^ -lrt $(CFLAGS) $(LDFLAGS)

bin/ical: bin/rfc5545.o 
	@mkdir -p bin
	@echo LD $@
	@$(CC) -o $@ $^ -lrt $(CFLAGS) $(LDFLAGS)

bin/partitioner/%.o: partitioner/%.c
	@mkdir -p bin/partitioner/
	@echo CC $<
	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@

bin/venti/%.o: venti/%.c venti/dat.h venti/fns.h
	@mkdir -p bin/venti/
	@echo CC $<
	@$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@

bin/%.o: aux/%.c
	@mkdir -p bin
	@echo CC $<
	@$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@

clean:
	$(RM) -r bin