SRCS = $(shell find . -maxdepth 1 -name "*.c*") BUILD_DIR = build/ $(shell if [ ! -e $(BUILD_DIR) ];then mkdir -p $(BUILD_DIR); fi) OBJS = $(addprefix $(BUILD_DIR), $(addsuffix .o, $(basename $(SRCS)))) EXEC = acec LIBS = -lgmp CXXFLAGS=-O3 -std=c++17 $(EXEC): $(OBJS) $(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) $(BUILD_DIR)%.o: %.cpp $(CXX) -c $< -o $@ $(CXXFLAGS) $(LIBS) $(BUILD_DIR)%.o: %.c gcc -c $< -o $@ $(CXXFLAGS) $(LIBS) clean: rm -f $(OBJS) $(EXEC) # CFLAGS=-O3 # solver: aiger.o main.o $(LIBS) # $(CXX) $^ -o $@ # aiger.o: aiger.c aiger.h # $(C) $(CFLAGS) -c $< -o $@ # main.o: main.cpp aiger.h # $(CC) $(CXXFLAGS) -c $< -o $@ # clean: # rm -rf *.o # rm -rf solver