/make/edam-mk

To get this branch, use:
bzr branch http://bzr.ed.am/make/edam-mk

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: edam
  • Date: 2009-03-05 13:25:26 UTC
  • Revision ID: edam@waxworlds.org-20090305132526-n50e3cqq1rhs3zfo
Tags: 1.5
- replaced debug option with debug switch
- added run goal

Show diffs side-by-side

added added

removed removed

1
 
#                                                       Edam's Makefile v1.6
 
1
#                                                       Edam's Makefile v1.5
2
2
#___________________________________________________________________________
3
3
#                                                            S E T T I N G S
4
4
 
5
5
# Target binary
6
 
TARGET          = groups
 
6
TARGET          = helloworld
7
7
 
8
8
# All source files
9
 
CC_SRCS         =
10
 
C_SRCS          = groups.c xmalloc.c
 
9
CC_SRCS         = helloworld.cc
 
10
C_SRCS          = 
11
11
S_SRCS          = 
12
12
 
13
13
# Libraries
14
14
LIBRARIES       = 
15
15
 
16
 
# Options (comment-out to disable)
 
16
# Uncomment for debug-build
17
17
DEBUG           = 1
18
 
#CPPBUILD       = 1
19
 
#STATICLIBS     = 1
20
18
 
21
19
#___________________________________________________________________________
22
20
#                                                                    M E A T
29
27
# Debug build flags
30
28
CPPFLAGS        = -g -D DEBUG
31
29
ASFLAGS         = -f elf -g -dDEBUG
32
 
LDFLAGS         = -Wall $(if $(STATICLIBS), -static)
 
30
LDFLAGS         = -Wall
33
31
 
34
32
else
35
33
 
36
34
# Release build flags
37
35
CPPFLAGS        = -O2
38
36
ASFLAGS         = -f elf -O2
39
 
LDFLAGS         = -Wall -s $(if $(STATICLIBS), -static)
 
37
LDFLAGS         = -Wall -s
40
38
 
41
39
endif
42
40
 
48
46
 
49
47
# Main rule...
50
48
$(TARGET): $(_OBJS)
51
 
        $(if $(CPPBUILD), g++, gcc) -o $(TARGET) $(LDFLAGS) $(_OBJS) $(LDLIBS)
 
49
        g++ -o $(TARGET) $(LDFLAGS) $(_OBJS) $(LDLIBS)
52
50
 
53
51
#___________________________________________________________________________
54
52
#                                                                  R U L E S