blob: bd5721aca9059ff24cb4f2b07448a500170b296e (
plain)
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
|
CC = gcc
LD = gcc
AR = ar rcs
CPPFLAGS = -g -Wall -Werror -D_FILE_OFFSET_BITS=64 -I.
LDFLAGS = -g -lssl
SOURCE_LIST = \
MPQCryptography.c \
errors.c \
extract.c \
mpq-bios.c \
mpq-errors.c \
mpq-file.c \
mpq-fs.c \
mpq-misc.c \
TARGET = mpqlib.a
OBJ_LIST = $(addsuffix .o, $(notdir $(basename $(SOURCE_LIST))))
DEP_LIST = $(addsuffix .dep, $(notdir $(basename $(SOURCE_LIST))))
all: dep $(TARGET)
$(TARGET): $(OBJ_LIST)
$(AR) $@ $(OBJ_LIST)
test-it: $(TARGET) test-it.o
$(LD) -o test-it test-it.o $(TARGET) $(LDFLAGS)
clean:
rm -f *.o *.dep $(TARGET) test-it
dep: $(ALL_DEPS)
%.dep : %.c
$(CC) $(CPPFLAGS) -M -MF $@ $<
-include $(ALL_DEPS)
|