/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:21:22 UTC
  • Revision ID: edam@waxworlds.org-20090305132122-lwtwrlwj19z7x792
Tags: 1.02
switched compiler to g++

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#                                                       Edam's Makefile v1.3
2
 
#___________________________________________________________________________
3
 
#                                                            S E T T I N G S
4
 
 
 
1
#
5
2
# Target binary
6
 
TARGET          = exectest
 
3
#
 
4
TARGET          = simplecrypt
7
5
 
 
6
#
8
7
# All source files
9
 
CC_SRCS         = 
 
8
#
 
9
CC_SRCS         = simplecrypt.cc
10
10
C_SRCS          = 
11
 
S_SRCS          = exectest.s
12
 
 
13
 
# Libraries
14
 
LIBRARIES       = 
15
 
 
16
 
# Debug?
17
 
DEBUG           = -g
18
 
 
 
11
S_SRCS          = 
 
12
 
 
13
#
19
14
# Build flags
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
 
15
#
 
16
#CFLAGS=-g
 
17
#LDFLAGS=
 
18
 
 
19
 
 
20
#---------------------------------------------------------------------------
 
21
# Edam's makefile r1.02
29
22
 
30
23
# More variables...
31
24
DEPFILE         = Depends
32
 
_SRCS           = $(CC_SRCS) $(C_SRCS) $(S_SRCS)
33
 
_OBJS           = $(addsuffix .o,$(basename $(_SRCS)))
34
 
LDLIBS          = $(addprefix -l,$(LIBRARIES))
 
25
SRCS            = $(C_SRCS) $(CC_SRCS) $(S_SRCS)
 
26
OBJS            = $(addsuffix .o,$(basename $(SRCS)))
35
27
 
36
28
# Main rule...
37
 
$(TARGET): $(_OBJS)
38
 
        gcc -o $(TARGET) $(LDFLAGS) $(_OBJS) $(LDLIBS)
 
29
$(TARGET): $(OBJS)
 
30
        g++ -o $(TARGET) $(OBJS) $(LDFLAGS)
39
31
 
40
 
#___________________________________________________________________________
41
 
#                                                                  R U L E S
 
32
#---------------------------------------------------------------------------
42
33
 
43
34
.PHONY: all clean depend dep
44
35
 
45
36
all:    clean depend $(TARGET)
46
37
 
47
38
clean:
48
 
        rm -f core $(DEPFILE) $(_OBJS)
 
39
        rm -f core $(DEPFILE) $(OBJS)
49
40
        rm -f *~
50
41
 
51
42
depend dep:
52
 
#       makedepend -f- -- $(CPPFLAGS) -- $(_SRCS) > $(DEPFILE)
 
43
        makedepend -f- -- $(CFLAGS) -- $(SRCS) > $(DEPFILE)
53
44
 
54
 
#___________________________________________________________________________
 
45
#---------------------------------------------------------------------------
55
46
#include $(DEPFILE)