CFLAGS+=-Wall -Wextra -Werror INCLUDE+=-Iinclude OUTDIR=.build PREFIX=/usr DESTDIR= .DEFAULT_GOAL=lc19 OBJECTS=\ $(OUTDIR)/util.o \ $(OUTDIR)/conf.o \ $(OUTDIR)/url.o \ $(OUTDIR)/srv.o \ $(OUTDIR)/main.o $(OUTDIR)/%.o: src/%.c @mkdir -p $(OUTDIR) $(CC) -pedantic -c -o $@ $(CFLAGS) $(INCLUDE) $< lc19: $(OBJECTS) $(CC) $(LDFLAGS) -o $@ $^ install: lc19 install -d $(DESTDIR)$(PREFIX)/bin install -T lc19 $(DESTDIR)$(PREFIX)/bin/lc19 clean: rm -fr $(OUTDIR) lc19 .PHONY: clean