-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (23 loc) · 677 Bytes
/
Makefile
File metadata and controls
33 lines (23 loc) · 677 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# author: Fabjan Sukalia <fsukalia@gmail.com>
# date: 2016-02-03
ifeq ($(CC),cc)
CC=gcc
endif
ifeq ($(CC),)
CC=gcc
endif
WARNINGS = -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wcast-align \
-Wstrict-prototypes -Wwrite-strings -Waggregate-return
CFLAGS := -std=c99 -pedantic $(WARNINGS) -O2 $(CFLAGS)
LFLAGS := $(LFLAGS)
DEBUG = -g -Og -fsanitize=address -fsanitize=undefined
.PHONY: all clean debug
all: huffdec huffenc
debug: CFLAGS+=$(DEBUG)
debug: all
clean:
rm -f huffdec huffenc
huffdec: decoder.c bit_reader.c huff_dec.c
$(CC) $(FLAGS) $(CFLAGS) $(LFLAGS) -o $@ $^
huffenc: encoder.c bit_writer.c huff_enc.c
$(CC) $(FLAGS) $(CFLAGS) $(LFLAGS) -o $@ $^