/make/edam-mk

To get this branch, use:
bzr branch http://bzr.ed.am/make/edam-mk
1 by edam
initial makefile
1
#
2
# Target binary
3
#
4
TARGET		= digest
5
6
#
7
# All source files
8
#
9
CC_SRCS		=
10
C_SRCS		= digest.c
11
S_SRCS		=
12
13
#
14
# Build flags
15
#
16
#CFLAGS=-g
17
LDFLAGS=-lcrypt -lssl
18
19
20
#---------------------------------------------------------------------------
21
# Edam's makefile v1.0
22
23
# More variables...
24
DEPFILE		= Depends
25
SRCS		= $(C_SRCS) $(CC_SCRS) $(S_SRCS)
26
OBJS		= $(addsuffix .o,$(basename $(SRCS)))
27
28
# Main rule...
29
$(TARGET): $(OBJS)
30
	$(CC) -o $(TARGET) $(OBJS) $(LDFLAGS)
31
32
#---------------------------------------------------------------------------
33
34
.PHONY:	all clean depend dep
35
36
all:	clean depend $(TARGET)
37
38
clean:
39
	rm -f core $(DEPFILE) $(OBJS)
40
	rm -f *~
41
42
depend dep:
43
	makedepend -f- -- $(CFLAGS) -- $(SRCS) > $(DEPFILE)
44
45
#---------------------------------------------------------------------------
46
#include $(DEPFILE)