CC=gcc
CFLAGS=-O0

all: cpu_dedup cpu_dedup_pthreads ema_replace_str ema_replace_str_pthreads

cpu_dedup: cpu_dedup.c cpu_utils.c
	$(CC) $(CFLAGS) -o cpu_dedup cpu_dedup.c cpu_utils.c util.c

cpu_dedup_pthreads: cpu_dedup_pthreads.c cpu_utils.c
	$(CC) $(CFLAGS) -pthread -o cpu_dedup_pthreads cpu_dedup_pthreads.c cpu_utils.c util.c

ema_replace_str: ema_replace_str.c ema_utils.c
	$(CC) $(CFLAGS) -o ema_replace_str ema_replace_str.c ema_utils.c util.c

ema_replace_str_pthreads: ema_replace_str_pthreads.c ema_utils.c
	$(CC) $(CFLAGS) -pthread -o ema_replace_str_pthreads ema_replace_str_pthreads.c ema_utils.c util.c

clean:
	rm -f cpu_dedup cpu_dedup_pthreads ema_replace_str ema_replace_str_pthreads
