BarryServer : Git

All the code for all my projects
// BarryServer : Git / IRCWebHooks / blob / 15ed2e4901d1b6a3c4906bb30f27cf249e48941d / Makefile

// Related

IRCWebHooks

Barry Cleaning build process 15ed2e4 (3 years, 2 months ago)
PRODUCT=bot

CC=gcc
CFLAGS=-lb64
LFLAGS=-lssl -lcrypto -lpthread -lb64

SOURCES := $(shell find src/ -name '*.c')
OBJS = $(sort $(subst src/,build/,$(subst .c,.o,$(SOURCES))))

install: $(PRODUCT)
	@echo "DONE!"

$(PRODUCT): $(OBJS)
	@echo "LINKING $(PRODUCT)..."
	@$(CC) -o $@ $^ $(LFLAGS)

clean:
	@echo "REMOVING OBJECT FILES..."
	@touch $(OBJS)
	@rm $(OBJS)

build/%.o: src/%.c
	@mkdir -p build/
	@echo "COMPILING $<..."
	@$(CC) -c $< -o $@ $(CFLAGS)