1 include $(TOP)/config/make.cfg
5 DEBUG_OPTS := -g -DDEBUG=0
21 ifeq ($(AROS_HOST_ARCH),aros)
22 FILES := error $(subst os_unix_support,os_aros_support,$(FILES))
25 AFSSRCDIR := $(SRCDIR)/rom/filesys/afs
26 ifneq ($(HOSTGENDIR),)
27 OBJDIR := $(HOSTGENDIR)/tools/host_afs
29 OBJDIR := ./tools/host_afs
31 OBJS := $(patsubst %, $(OBJDIR)/%.o, $(FILES))
32 DEPS := $(patsubst %, $(OBJDIR)/%.d, $(FILES))
34 INCLUDES := -I$(AFSSRCDIR) -I$(OBJDIR)
35 HOST_CFLAGS := $(HOST_CFLAGS) $(DEBUG_OPTS) -Wall -Werror-implicit-function-declaration $(INCLUDES) -O2
41 .PHONY: all depend clean
43 all: $(OBJDIR) depend $(AFSLIB)
46 @$(ECHO) "Creating $@..."
50 $(OBJDIR)/config.h: $(OBJDIR) myconf.aros
51 @./myconf.aros $(TOP) >> $@
53 $(OBJDIR)/%.o: $(AFSSRCDIR)/%.c $(OBJDIR)/config.h
54 @$(ECHO) "Compiling $(notdir $@)..."
55 @$(HOST_CC) $(HOST_CFLAGS) -o $@ -c $<
57 $(OBJDIR)/%.d: $(AFSSRCDIR)/%.c $(OBJDIR)/config.h
58 @$(ECHO) "Finding dependencies for $<..."
59 @$(HOST_CC) $(HOST_CFLAGS) -M -MT '$(patsubst %.d,%.o,$@)' $< > $@
65 @$(RM) -f $(AFSLIB) $(OBJDIR)