BarryServer : Git

All the code for all my projects
// BarryServer : Git / PolymorphicEngine / blob / 5f6e3abc877e4b84eb39d070fdb2c94d98d212a5 / Makefile

// Related

PolymorphicEngine

Barry Initial commit 646db1c (3 years, 5 months ago)
PRODUCT = poly_original

CC=gcc
CFLAGS=
LFLAGS=-T script.ld

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

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

clean:
	@echo "REMOVING OBJECT FILES..."
	@touch build/main.o
	@rm $(OBJS)

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