x86: cpu: clean up check for cpuid instruction support
[libav.git] / common.mak
CommitLineData
8b2121e3
MR
1#
2# common bits used by all libraries
3#
4
451db983
MR
5# first so "all" becomes default target
6all: all-yes
0e32c8c6 7
7bb3a302 8include $(SRC_PATH)/arch.mak
c5662879 9
6ccf540f
DB
10OBJS += $(OBJS-yes)
11FFLIBS := $(FFLIBS-yes) $(FFLIBS)
12TESTPROGS += $(TESTPROGS-yes)
8b2121e3 13
deb3ed01 14FFEXTRALIBS := $(FFLIBS:%=-l%$(BUILDSUF)) $(EXTRALIBS)
8b2121e3 15
deb3ed01
MR
16EXAMPLES := $(EXAMPLES:%=$(SUBDIR)%-example$(EXESUF))
17OBJS := $(sort $(OBJS:%=$(SUBDIR)%))
18TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o)
19TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF))
20HOSTOBJS := $(HOSTPROGS:%=$(SUBDIR)%.o)
21HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF))
28e1c979
MR
22TOOLS += $(TOOLS-yes)
23TOOLOBJS := $(TOOLS:%=tools/%.o)
24TOOLS := $(TOOLS:%=tools/%$(EXESUF))
8b2121e3 25
798b2646 26DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
76ca42a8 27
7b5e8a27 28ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
deb3ed01
MR
29SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-)
30SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
95f2c769 31checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho))
8b2121e3 32
28e1c979
MR
33alltools: $(TOOLS)
34
de4070b5
MR
35$(HOSTOBJS): %.o: %.c
36 $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
37
38$(HOSTPROGS): %$(HOSTEXESUF): %.o
39 $(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
40
3e5cce81
DB
41$(OBJS): | $(sort $(dir $(OBJS)))
42$(HOSTOBJS): | $(sort $(dir $(HOSTOBJS)))
43$(TESTOBJS): | $(sort $(dir $(TESTOBJS)))
28e1c979 44$(TOOLOBJS): | tools
5e27ec28
MR
45
46OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOSTOBJS) $(TESTOBJS))
47
a482e61b 48CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
79de9c83 49DISTCLEANSUFFIXES = *.pc
b5a3c603 50LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a
76a448ed 51
2f97b12e 52-include $(wildcard $(OBJS:.o=.d) $(TESTOBJS:.o=.d))