blob: 6627a74fd9a7801db372b52d7112d92ff58de794 (
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
42
43
44
45
|
CC = gcc
LD = gcc
AR = ar rcs
CPPFLAGS = -g -Wall -Werror -D_FILE_OFFSET_BITS=64 -I.
LDFLAGS = -g -lz
SOURCE_LIST = \
MPQCryptography.c \
errors.c \
extract.c \
lookupa.c \
hashtab.c \
recycle.c \
mpq-bios.c \
mpq-errors.c \
mpq-file.c \
mpq-fs.c \
mpq-misc.c \
stalloc.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: $(DEP_LIST)
%.dep : %.c
$(CC) $(CPPFLAGS) -M -MF $@ $<
-include $(DEP_LIST)
|