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_LIB = mulithash.a
TARGET_BIN = multihash TARGET_BIN = multihash
MAIN = src/main.c
MAIN_O = $(MAIN:.c=.o)
SRCS = src/hashes.c src/errors.c src/multihash.c SRCS = src/hashes.c src/errors.c src/multihash.c
OBJS = $(SRCS:.c=.o) OBJS = $(SRCS:.c=.o)
src/%.o: src/%.c src/%.o: src/%.c
$(CC) $(CFLAGS) -c -I include $< -o $@ $(CC) $(CFLAGS) -c -I include $< -o $@
all: $(TARGET_LIB) $(TARGET_BIN) all: $(TARGET_LIB)
$(TARGET_LIB): $(OBJS) $(TARGET_LIB): $(OBJS)
ar rcs $@ $^ ar rcs $@ $^
$(TARGET_BIN): $(MAIN_O) $(TARGET_LIB)
$(CC) $(LDFLAGS) $^ -o $@
# Tests # Tests
TEST_SRCS = $(wildcard tests/c/test_*.c) TEST_SRCS = $(wildcard tests/c/test_*.c)