2006-02-13 14:53:25 +02:00
|
|
|
#
|
|
|
|
# common bits used by all libraries
|
|
|
|
#
|
|
|
|
|
2010-03-09 16:58:18 +02:00
|
|
|
# first so "all" becomes default target
|
|
|
|
all: all-yes
|
2008-03-07 21:27:17 +02:00
|
|
|
|
2012-03-28 00:10:02 +03:00
|
|
|
include $(SRC_PATH)/arch.mak
|
2009-04-13 01:48:44 +03:00
|
|
|
|
2009-03-25 20:14:28 +02:00
|
|
|
OBJS += $(OBJS-yes)
|
|
|
|
FFLIBS := $(FFLIBS-yes) $(FFLIBS)
|
|
|
|
TESTPROGS += $(TESTPROGS-yes)
|
2006-02-13 14:53:25 +02:00
|
|
|
|
2011-06-28 16:45:57 +03:00
|
|
|
FFEXTRALIBS := $(FFLIBS:%=-l%$(BUILDSUF)) $(EXTRALIBS)
|
2006-02-13 14:53:25 +02:00
|
|
|
|
2011-06-28 16:45:57 +03:00
|
|
|
EXAMPLES := $(EXAMPLES:%=$(SUBDIR)%-example$(EXESUF))
|
|
|
|
OBJS := $(sort $(OBJS:%=$(SUBDIR)%))
|
|
|
|
TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o)
|
|
|
|
TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF))
|
|
|
|
HOSTOBJS := $(HOSTPROGS:%=$(SUBDIR)%.o)
|
|
|
|
HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF))
|
2011-07-10 22:26:25 +03:00
|
|
|
TOOLS += $(TOOLS-yes)
|
|
|
|
TOOLOBJS := $(TOOLS:%=tools/%.o)
|
|
|
|
TOOLS := $(TOOLS:%=tools/%$(EXESUF))
|
2006-02-13 14:53:25 +02:00
|
|
|
|
2011-05-28 15:10:01 +03:00
|
|
|
DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
|
2008-04-10 00:11:39 +03:00
|
|
|
|
2009-01-12 00:48:07 +02:00
|
|
|
ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
|
2011-06-28 16:45:57 +03:00
|
|
|
SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-)
|
|
|
|
SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
|
2009-08-23 14:02:37 +03:00
|
|
|
checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho))
|
2006-02-13 14:53:25 +02:00
|
|
|
|
2011-07-10 22:26:25 +03:00
|
|
|
alltools: $(TOOLS)
|
|
|
|
|
2009-10-29 02:55:35 +02:00
|
|
|
$(HOSTOBJS): %.o: %.c
|
2012-07-20 13:01:19 +03:00
|
|
|
$(call COMPILE,HOSTCC)
|
2009-10-29 02:55:35 +02:00
|
|
|
|
|
|
|
$(HOSTPROGS): %$(HOSTEXESUF): %.o
|
|
|
|
$(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
|
|
|
|
|
2011-07-10 22:05:45 +03:00
|
|
|
$(OBJS): | $(sort $(dir $(OBJS)))
|
|
|
|
$(HOSTOBJS): | $(sort $(dir $(HOSTOBJS)))
|
|
|
|
$(TESTOBJS): | $(sort $(dir $(TESTOBJS)))
|
2011-07-10 22:26:25 +03:00
|
|
|
$(TOOLOBJS): | tools
|
2011-06-28 20:45:13 +03:00
|
|
|
|
|
|
|
OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOSTOBJS) $(TESTOBJS))
|
|
|
|
|
2010-01-16 06:49:02 +02:00
|
|
|
CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
|
2009-11-22 16:22:13 +02:00
|
|
|
DISTCLEANSUFFIXES = *.pc
|
2012-04-30 11:33:49 +03:00
|
|
|
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a
|
2008-02-25 11:22:11 +02:00
|
|
|
|
2012-07-20 13:01:19 +03:00
|
|
|
-include $(wildcard $(OBJS:.o=.d) $(HOSTOBJS:.o=.d) $(TESTOBJS:.o=.d))
|