2
#___________________________________________________________________________
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)
20
#---------------------------------------------------------------------------
21
# Edam's makefile v1.0
48
23
# More variables...
50
_SRCS = $(CC_SRCS) $(C_SRCS) $(S_SRCS)
51
_OBJS = $(addsuffix .o,$(basename $(_SRCS)))
52
LDLIBS = $(addprefix -l,$(LIBRARIES))
25
SRCS = $(C_SRCS) $(CC_SCRS) $(S_SRCS)
26
OBJS = $(addsuffix .o,$(basename $(SRCS)))
56
$(if $(CPPBUILD), g++, gcc) -o $(TARGET) $(LDFLAGS) $(_OBJS) $(LDLIBS)
58
#___________________________________________________________________________
61
.PHONY: all clean run depend dep
30
$(CC) -o $(TARGET) $(OBJS) $(LDFLAGS)
32
#---------------------------------------------------------------------------
34
.PHONY: all clean depend dep
63
36
all: clean depend $(TARGET)
66
rm -f core $(DEPFILE) $(_OBJS)
39
rm -f core $(DEPFILE) $(OBJS)
73
# makedepend -f- -- $(CPPFLAGS) -- $(_SRCS) > $(DEPFILE)
43
makedepend -f- -- $(CFLAGS) -- $(SRCS) > $(DEPFILE)
75
#___________________________________________________________________________
45
#---------------------------------------------------------------------------
76
46
#include $(DEPFILE)