💾 Archived View for gemini.thededem.de › lc19 › src › Makefile captured on 2021-12-03 at 14:04:38.

View Raw

More Information

-=-=-=-=-=-=-

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) {body}lt;

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