forked from komiya-atsushi/zipzop
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
45 lines (34 loc) · 943 Bytes
/
Makefile
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
33
34
35
36
37
38
39
40
41
42
43
44
PREFIX =
ZOPFLI_DIR = zopfli
#DEFINES=-DLOCAL1
CC = $(PREFIX)gcc
OPT_CFLAGS =
WARN = -W -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable
CFLAGS = -c -g -O2 $(WARN) $(OPT_CFLAGS) $(DEFINES)
INCLUDES = -I$(ZOPFLI_DIR)/src/zopfli
#CFLAGS += $(INCLUDES)
LD = $(PREFIX)gcc
OPT_LDFLAGS =
LDFLAGS = $(OPT_LDFLAGS)
ZIPZOP_OBJS = header.o recompress.o zz_util.o zipzop.o
ZOPFLI_DIR = zopfli
ZOPFLISRC_DIR = zopfli/src/zopfli
OBJS = $(ZIPZOP_OBJS)
LIBS = -lz -lm -L$(ZOPFLI_DIR) -lzopfli
E =
TARGET = zipzop$(E)
$(TARGET): $(OBJS)
$(LD) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
# strip $(TARGET)
header.o: src/header.c
$(CC) $< $(CFLAGS) $(INCLUDES)
recompress.o: src/recompress.c $(ZOPFLISRC_DIR)/deflate.h
$(CC) $< $(CFLAGS) $(INCLUDES)
zz_util.o: src/zz_util.c
$(CC) $< $(CFLAGS) $(INCLUDES)
zipzop.o: src/zipzop.c
$(CC) $< $(CFLAGS) $(INCLUDES)
zopfli:
git clone https://github.com/google/zopfli/
clean:
rm -f *.o $(TARGET)