Created
March 10, 2015 13:56
-
-
Save slauwers/31f7d9b28402d767f4a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET := solver | |
LIBS := -lzmq -ljson-c -lpthread -lcrypto | |
CC := gcc | |
CFLAGS := -m64 -std=gnu11 -pedantic -Wall -Wshadow -Wpointer-arith \ | |
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Werror \ | |
-Wextra -O3 -g -Isrc | |
LFLAGS := -Wall | |
GRIND := valgrind | |
GRIND_OPTS := --leak-check=full | |
SRC_DIR := src | |
TEST_DIR := tests | |
TESTS := test_is_anagram | |
.PHONY: default all clean grind run tests | |
all: $(TARGET) | |
OBJECTS := $(SRC_DIR)/client.o $(SRC_DIR)/list.o $(SRC_DIR)/log.o \ | |
$(SRC_DIR)/solver.o | |
MAIN_OBJECTS := $(SRC_DIR)/main.o | |
.PRECIOUS: $(TARGET) $(OBJECTS) | |
$(TARGET): $(OBJECTS) $(MAIN_OBJECTS) | |
$(CC) $^ $(LFLAGS) $(LIBS) -o $@ | |
clean: | |
-rm -f $(SRC_DIR)/*.o $(TEST_DIR)/*.o | |
-rm -f $(TARGET) | |
grind: all | |
$(GRIND) $(GRIND_OPTS) ./$(TARGET) | |
run: all | |
./$(TARGET) | |
tests: $(TESTS) | |
test_is_anagram: $(OBJECTS) $(TEST_DIR)/test_is_anagram.o | |
$(CC) $^ $(CFLAGS) -Wall $(LIBS) -o $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment