1 # Copyright © 2001-2003, The AROS Development Team. All rights reserved.
4 # Makefile to build the ADF library.
6 include $(TOP)/config/make.cfg
11 adf_hd adf_disk adf_raw adf_bitm adf_dump adf_util adf_env \
12 adf_dir adf_file adf_cache adf_link adf_salv
14 OBJDIR := $(GENDIR)/tools/host_adflib
15 OBJS := $(patsubst %, $(OBJDIR)/%.o, $(SRCS))
16 DEPS := $(patsubst %, $(OBJDIR)/%.d, $(SRCS))
19 HOST_CFLAGS := $(HOST_CFLAGS) -Wall -I. -O2 -I${NATIV_DIR} -I$(OBJDIR)
25 all : depend $(OBJDIR) $(ADFLIB)
27 # to define LITT_ENDIAN on little endian machines (intel)
28 # checks for sizeof(long)=4, sizeof(short)=2, sizeof(int)=4
29 $(OBJDIR)/defendian.h: myconf.aros
32 $(ADFLIB) : $(OBJS) $(OBJDIR)/adf_nativ.o
33 @$(ECHO) "Creating adflib/$(notdir $@)..."
37 $(OBJDIR)/%.o : %.c $(OBJDIR) $(OBJDIR)/defendian.h
38 @$(ECHO) "Compiling $(notdir $@)..."
39 @$(HOST_CC) $(HOST_CFLAGS) -o $@ -c $<
41 $(OBJDIR)/%.d : %.c $(OBJDIR) $(OBJDIR)/defendian.h
42 @$(ECHO) "Finding dependencies for $<..."
43 @$(HOST_CC) $(HOST_CFLAGS) -M $< > $@
45 $(OBJDIR)/adf_nativ.o: $(OBJDIR) $(NATIV_DIR)/adf_nativ.c $(NATIV_DIR)/adf_nativ.h
46 @$(HOST_CC) $(HOST_CFLAGS) -c $(NATIV_DIR)/adf_nativ.c -o $@
52 @$(RM) -f $(ADFLIB) $(OBJDIR)