/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:28:28 UTC
  • Revision ID: edam@waxworlds.org-20090305132828-fbaz7j6st7ualnge
Tags: 1.7
- puled out options to set flags for g++, as and ld

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#                                                       Edam's Makefile v1.6
 
1
#                                                       Edam's Makefile v1.7
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
 
LIBRARIES       = 
 
14
LIBRARIES       =
15
15
 
16
16
# Options (comment-out to disable)
17
17
DEBUG           = 1
18
 
#CPPBUILD       = 1
 
18
CPPBUILD        = 1
19
19
#STATICLIBS     = 1
20
20
 
 
21
# Other flags
 
22
CPPFLAGS        = 
 
23
ASFLAGS         = 
 
24
LDFLAGS         = 
 
25
 
21
26
#___________________________________________________________________________
22
27
#                                                                    M E A T
23
28
 
27
32
ifdef DEBUG
28
33
 
29
34
# Debug build flags
30
 
CPPFLAGS        = -g -D DEBUG
31
 
ASFLAGS         = -f elf -g -dDEBUG
32
 
LDFLAGS         = -Wall $(if $(STATICLIBS), -static)
 
35
CPPFLAGS        := $(CPPFLAGS) -g -D DEBUG
 
36
ASFLAGS         := -f elf -g -dDEBUG
 
37
LDFLAGS         := -Wall $(if $(STATICLIBS), -static) $(LDFLAGS)
33
38
 
34
39
else
35
40
 
36
41
# Release build flags
37
 
CPPFLAGS        = -O2
38
 
ASFLAGS         = -f elf -O2
39
 
LDFLAGS         = -Wall -s $(if $(STATICLIBS), -static)
 
42
CPPFLAGS        := $(CPPFLAGS) -O2
 
43
ASFLAGS         := -f elf -O2
 
44
LDFLAGS         := -Wall -s $(if $(STATICLIBS), -static) $(LDFLAGS)
40
45
 
41
46
endif
42
47