forked from mmozeiko/pkg2zip
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
39 lines (29 loc) · 659 Bytes
/
makefile
File metadata and controls
39 lines (29 loc) · 659 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
33
34
35
36
37
38
39
ifeq ($(OS),Windows_NT)
RM := del /q
EXE := .exe
else
EXE :=
endif
BIN=pkg2zip${EXE}
SRC=${wildcard pkg2zip*.c} miniz_tdef.c puff.c
OBJ=${SRC:.c=.o}
DEP=${SRC:.c=.d}
CFLAGS=-std=c99 -pipe -fvisibility=hidden -Wall -Wextra -Werror -DNDEBUG -D_GNU_SOURCE -O2
LDFLAGS=-s
.PHONY: all clean
all: ${BIN}
clean:
@${RM} ${BIN} ${OBJ} ${DEP}
${BIN}: ${OBJ}
@echo [L] $@
@${CC} ${LDFLAGS} -o $@ $^
%aes_x86.o: %aes_x86.c
@echo [C] $<
@${CC} ${CFLAGS} -maes -mssse3 -MMD -c -o $@ $<
%crc32_x86.o: %crc32_x86.c
@echo [C] $<
@${CC} ${CFLAGS} -mpclmul -msse4 -MMD -c -o $@ $<
%.o: %.c
@echo [C] $<
@${CC} ${CFLAGS} -MMD -c -o $@ $<
-include ${DEP}