1 include $(TOP
)/config
/make.cfg
5 DEBUG_OPTS
:= -g
-DDEBUG
=0
9 AFSSRCDIR
:= $(SRCDIR
)/rom
/devs
/filesys
/afs
10 ifneq ($(HOSTGENDIR
),)
11 OBJDIR
:= $(HOSTGENDIR
)/tools
/host_copytoafs
13 OBJDIR
:= .
/tools
/host_copytoafs
15 OBJS
:= $(patsubst %, $(OBJDIR
)/%.o
, $(FILES
))
16 DEPS
:= $(patsubst %, $(OBJDIR
)/%.d
, $(FILES
))
18 INCLUDES
:= -I
$(AFSSRCDIR
) -I
$(OBJDIR
)
19 HOST_CFLAGS
:= $(HOST_CFLAGS
) $(DEBUG_OPTS
) -Wall
-Werror-implicit-function-declaration
$(INCLUDES
) -O2
25 .PHONY
: all depend
clean
27 all: depend
$(OBJDIR
) $(COPYTOAFS
)
30 @
$(ECHO
) "Linking $@..."
31 @
$(HOST_CC
) $(OBJS
) $(AFSLIB
) -o
$@
33 $(OBJDIR
)/config.h
: $(OBJDIR
) myconf.aros
36 $(OBJDIR
)/%.o
: %.c
$(OBJDIR
)/config.h
37 @
$(ECHO
) "Compiling $(notdir $@)..."
38 @
$(HOST_CC
) $(HOST_CFLAGS
) -o
$@
-c
$<
40 $(OBJDIR
)/%.d
: %.c
$(OBJDIR
)/config.h
41 @
$(ECHO
) "Finding dependencies for $<..."
42 @
$(HOST_CC
) $(HOST_CFLAGS
) -M
-MT
'$(patsubst %.d,%.o,$@)' $< > $@
48 @
$(RM
) -f
$(COPYTOAFS
) $(OBJDIR
)