2
#___________________________________________________________________________
16
# Override options (better: specify in environment or on cmdline)
27
#___________________________________________________________________________
31
CC := $(if $(CPPBUILD), g++, gcc)
36
CPPFLAGS := -g -D DEBUG $(CPPFLAGS)
37
ASFLAGS := -f elf -g -dDEBUG $(ASFLAGS)
38
LDFLAGS := -Wall $(if $(STATICLIBS), -static) $(LDFLAGS)
43
CPPFLAGS := -O2 $(CPPFLAGS)
44
ASFLAGS := -f elf -O2 $(ASFLAGS)
45
LDFLAGS := -Wall -s $(if $(STATICLIBS), -static) $(LDFLAGS)
20
#---------------------------------------------------------------------------
21
# Edam's makefile v1.0
49
23
# More variables...
51
_SRCS := $(CC_SRCS) $(C_SRCS) $(S_SRCS)
52
_OBJS := $(addsuffix .o,$(basename $(_SRCS)))
53
LDLIBS := $(addprefix -l,$(LIBRARIES))
55
.PHONY: all clean run depend dep
61
$(AR) rcs $(TARGET) $(_OBJS)
63
$(CC) -o $(TARGET) $(LDFLAGS) $(LDLIBS) $(_OBJS)
25
SRCS = $(C_SRCS) $(CC_SCRS) $(S_SRCS)
26
OBJS = $(addsuffix .o,$(basename $(SRCS)))
30
$(CC) -o $(TARGET) $(OBJS) $(LDFLAGS)
32
#---------------------------------------------------------------------------
34
.PHONY: all clean depend dep
36
all: clean depend $(TARGET)
67
rm -f core $(DEPFILE) $(_OBJS)
39
rm -f core $(DEPFILE) $(OBJS)
74
# makedepend -f- -- $(CPPFLAGS) -- $(_SRCS) > $(DEPFILE)
43
makedepend -f- -- $(CFLAGS) -- $(SRCS) > $(DEPFILE)
76
#___________________________________________________________________________
45
#---------------------------------------------------------------------------
77
46
#include $(DEPFILE)