/make/edam-mk

To get this branch, use:
bzr branch http://bzr.ed.am/make/edam-mk
3 by edam
- added propper header
1
#                                                       Edam's Makefile v1.3
2
#___________________________________________________________________________
3
#                                                            S E T T I N G S
4
1 by edam
initial makefile
5
# Target binary
3 by edam
- added propper header
6
TARGET		= exectest
1 by edam
initial makefile
7
8
# All source files
3 by edam
- added propper header
9
CC_SRCS		= 
2 by edam
switched compiler to g++
10
C_SRCS		= 
3 by edam
- added propper header
11
S_SRCS		= exectest.s
12
13
# Libraries
14
LIBRARIES	= 
15
16
# Debug?
17
DEBUG		= -g
18
1 by edam
initial makefile
19
# Build flags
3 by edam
- added propper header
20
CPPFLAGS	= $(DEBUG) -O2
21
ASFLAGS		= $(DEBUG) -f elf
22
LDFLAGS		= $(DEBUG) -Wall -s -nostartfiles
23
24
#___________________________________________________________________________
25
#                                                                    M E A T
26
27
# Software
28
AS=nasm
1 by edam
initial makefile
29
30
# More variables...
31
DEPFILE		= Depends
3 by edam
- added propper header
32
_SRCS		= $(CC_SRCS) $(C_SRCS) $(S_SRCS)
33
_OBJS		= $(addsuffix .o,$(basename $(_SRCS)))
34
LDLIBS		= $(addprefix -l,$(LIBRARIES))
1 by edam
initial makefile
35
36
# Main rule...
3 by edam
- added propper header
37
$(TARGET): $(_OBJS)
38
	gcc -o $(TARGET) $(LDFLAGS) $(_OBJS) $(LDLIBS)
1 by edam
initial makefile
39
3 by edam
- added propper header
40
#___________________________________________________________________________
41
#                                                                  R U L E S
1 by edam
initial makefile
42
43
.PHONY:	all clean depend dep
44
45
all:	clean depend $(TARGET)
46
47
clean:
3 by edam
- added propper header
48
	rm -f core $(DEPFILE) $(_OBJS)
1 by edam
initial makefile
49
	rm -f *~
50
51
depend dep:
3 by edam
- added propper header
52
#	makedepend -f- -- $(CPPFLAGS) -- $(_SRCS) > $(DEPFILE)
1 by edam
initial makefile
53
3 by edam
- added propper header
54
#___________________________________________________________________________
1 by edam
initial makefile
55
#include $(DEPFILE)