Skip to content

Commit 0dc9035

Browse files
committed
add Makefile
1 parent 6664327 commit 0dc9035

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Makefile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# author: Fabjan Sukalia <[email protected]>
2+
# date: 2016-02-03
3+
4+
ifeq ($(CC),cc)
5+
CC=gcc
6+
endif
7+
8+
ifeq ($(CC),)
9+
CC=gcc
10+
endif
11+
12+
WARNINGS = -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wcast-align \
13+
-Wstrict-prototypes -Wwrite-strings -Waggregate-return
14+
CFLAGS := -std=c99 -pedantic $(WARNINGS) -O2 $(CFLAGS)
15+
LFLAGS := $(LFLAGS)
16+
DEBUG = -g -O0 -fsanitize=address
17+
18+
.PHONY: all clean debug
19+
20+
all: huffdec
21+
22+
debug: CFLAGS+=$(DEBUG)
23+
debug: all
24+
25+
clean:
26+
rm -f hufdec
27+
28+
huffdec: decoder.c bit_reader.c huff_dec.c
29+
$(CC) $(FLAGS) $(CFLAGS) $(LFLAGS) -o $@ $^
30+

0 commit comments

Comments
 (0)