~ecs/tbrace

f007a19db559710662c4d2ec037c26c838eee9c4 — Eyal Sawady 10 months ago fa00264 master
Makefile: rewrite
1 files changed, 11 insertions(+), 10 deletions(-)

M Makefile
M Makefile => Makefile +11 -10
@@ 1,15 1,16 @@
CC = musl-gcc
CFLAGS = -ansi -Wall -Wextra -pedantic -static
CC ?= cc
CFLAGS ?= -static -Wall -Wextra -pedantic -O2 -ansi -Werror -pedantic-errors
OUT ?= tbrace

all: tbrace
	./tbrace
all: $(OUT)

tbrace: main.o config.h helpers.o state.o update.o
	$(CC) $(CFLAGS) main.o state.o helpers.o update.o -o tbrace
$(OUT): main.o config.h helpers.o state.o update.o
	$(CC) $(CFLAGS) -o $(OUT) main.o state.o helpers.o update.o

%.o: %.c %.h
	$(CC) $(CFLAGS) $< -c
%.o: %.c *.h
	$(CC) $(CFLAGS) -c $<

clean:
	rm tbrace
	rm *.o
	rm -f $(OUT) *.o

.PHONY: clean