summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: c12e4402a39f4e678609da7af06a1cdb5c31f52c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
BINS = ascii class depipe_strings dup fpipe pipe realloc strpbrk strsep \
       tokenizer getopt prime_mask linked_list pi_bbp
CC = gcc
CFLAGS = -Wall -std=gnu99 -pedantic
DBGFLAGS = -g -O0
ifdef DEBUG
    CFLAGS += $(DBGFLAGS) -D DEBUG
else
    CFLAGS += -O2 -mtune=native -march=native
endif
LDFLAGS = -lm

all: $(BINS)

$(BINS): %: %.c
	$(CC) $(CFLAGS) $^ -o $@ 


.PHONY: clean

clean:
	rm -f ./$(BINS)