removed building of main from makefile

This commit is contained in:
John Jones 2016-11-10 09:29:42 -05:00
parent 904cdf6871
commit 5ad6f0d58f

View file

@ -16,23 +16,17 @@ LDLIBS =
TARGET_LIB = mulithash.a
TARGET_BIN = multihash
MAIN = src/main.c
MAIN_O = $(MAIN:.c=.o)
SRCS = src/hashes.c src/errors.c src/multihash.c
OBJS = $(SRCS:.c=.o)
src/%.o: src/%.c
$(CC) $(CFLAGS) -c -I include $< -o $@
all: $(TARGET_LIB) $(TARGET_BIN)
all: $(TARGET_LIB)
$(TARGET_LIB): $(OBJS)
ar rcs $@ $^
$(TARGET_BIN): $(MAIN_O) $(TARGET_LIB)
$(CC) $(LDFLAGS) $^ -o $@
# Tests
TEST_SRCS = $(wildcard tests/c/test_*.c)