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
46
|
#
# Target binary
#
TARGET = digest
#
# All source files
#
CC_SRCS =
C_SRCS = digest.c
S_SRCS =
#
# Build flags
#
#CFLAGS=-g
LDFLAGS=-lcrypt -lssl
#---------------------------------------------------------------------------
# Edam's makefile v1.0
# More variables...
DEPFILE = Depends
SRCS = $(C_SRCS) $(CC_SCRS) $(S_SRCS)
OBJS = $(addsuffix .o,$(basename $(SRCS)))
# Main rule...
$(TARGET): $(OBJS)
$(CC) -o $(TARGET) $(OBJS) $(LDFLAGS)
#---------------------------------------------------------------------------
.PHONY: all clean depend dep
all: clean depend $(TARGET)
clean:
rm -f core $(DEPFILE) $(OBJS)
rm -f *~
depend dep:
makedepend -f- -- $(CFLAGS) -- $(SRCS) > $(DEPFILE)
#---------------------------------------------------------------------------
#include $(DEPFILE)
|