2
#___________________________________________________________________________
20
#---------------------------------------------------------------------------
21
# Edam's makefile v1.0
9
CC_SRCS = helloworld.cc
16
# Options (comment-out to disable)
26
#___________________________________________________________________________
35
CPPFLAGS := $(CPPFLAGS) -g -D DEBUG
36
ASFLAGS := -f elf -g -dDEBUG
37
LDFLAGS := -Wall $(if $(STATICLIBS), -static) $(LDFLAGS)
42
CPPFLAGS := $(CPPFLAGS) -O2
44
LDFLAGS := -Wall -s $(if $(STATICLIBS), -static) $(LDFLAGS)
23
48
# More variables...
25
SRCS = $(C_SRCS) $(CC_SCRS) $(S_SRCS)
26
OBJS = $(addsuffix .o,$(basename $(SRCS)))
50
_SRCS = $(CC_SRCS) $(C_SRCS) $(S_SRCS)
51
_OBJS = $(addsuffix .o,$(basename $(_SRCS)))
52
LDLIBS = $(addprefix -l,$(LIBRARIES))
30
$(CC) -o $(TARGET) $(OBJS) $(LDFLAGS)
32
#---------------------------------------------------------------------------
34
.PHONY: all clean depend dep
56
$(if $(CPPBUILD), g++, gcc) -o $(TARGET) $(LDFLAGS) $(_OBJS) $(LDLIBS)
58
#___________________________________________________________________________
61
.PHONY: all clean run depend dep
36
63
all: clean depend $(TARGET)
39
rm -f core $(DEPFILE) $(OBJS)
66
rm -f core $(DEPFILE) $(_OBJS)
43
makedepend -f- -- $(CFLAGS) -- $(SRCS) > $(DEPFILE)
73
# makedepend -f- -- $(CPPFLAGS) -- $(_SRCS) > $(DEPFILE)
45
#---------------------------------------------------------------------------
75
#___________________________________________________________________________
46
76
#include $(DEPFILE)