12 lines
222 B
Makefile
12 lines
222 B
Makefile
C_SOURCES:=$(wildcard ./*.c)
|
|
C_TARGETS:=$(patsubst ./%.c, ../bin/%, $(C_SOURCES))
|
|
TARGETS:=$(C_TARGETS)
|
|
|
|
CFLAGS?=-s -Os -flto -pedantic -Wall -Wextra
|
|
CC?=cc
|
|
|
|
all: ../bin $(TARGETS)
|
|
|
|
../bin/%: %.c
|
|
$(CC) $(CFLAGS) -o $@ $<
|