added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / tools / copytoafs / Makefile
blob61a4cca8716d08fac134d397fee76d2824fcfc42
1 include $(TOP)/config/make.cfg
3 SILENT := yes
5 DEBUG_OPTS := -g -DDEBUG=0
7 FILES := copytoafs
9 AFSSRCDIR := $(TOP)/workbench/devs/afs
10 OBJDIR := $(GENDIR)/tools/host_copytoafs
11 OBJS := $(patsubst %, $(OBJDIR)/%.o, $(FILES))
12 DEPS := $(patsubst %, $(OBJDIR)/%.d, $(FILES))
14 INCLUDES := -I$(AFSSRCDIR) -I$(OBJDIR)
15 HOST_CFLAGS := $(HOST_CFLAGS) $(DEBUG_OPTS) -Wall -Werror-implicit-function-declaration $(INCLUDES) -O2
17 ifeq ($(SILENT),yes)
18 ECHO := true
19 endif
21 .PHONY: all depend clean
23 all: depend $(OBJDIR) $(COPYTOAFS)
25 $(COPYTOAFS): $(OBJS)
26 @$(ECHO) "Linking $@..."
27 @$(HOST_CC) $(OBJS) $(AFSLIB) -o $@
29 $(OBJDIR)/config.h: $(OBJDIR) myconf.aros
30 @./myconf.aros >> $@
32 $(OBJDIR)/%.o: %.c $(OBJDIR)/config.h
33 @$(ECHO) "Compiling $(notdir $@)..."
34 @$(HOST_CC) $(HOST_CFLAGS) -o $@ -c $<
36 $(OBJDIR)/%.d: %.c $(OBJDIR)/config.h
37 @$(ECHO) "Finding dependencies for $<..."
38 @$(HOST_CC) $(HOST_CFLAGS) -M -MT '$(patsubst %.d,%.o,$@)' $< > $@
40 $(OBJDIR):
41 @$(MKDIR) $(OBJDIR)
43 clean:
44 @$(RM) $(COPYTOAFS) $(OBJDIR)
46 depend: $(DEPS)
48 -include $(DEPS)