From c0a9ef980f94f12fdd9ba7d1949b2a05111b5ade Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 16 Oct 2008 15:00:00 +0200 Subject: removed the "bs" build scripts autotools are somewhat ugly, but that doesn't justify duplicating its effort with another complex build system. --- build.mk | 103 --------------------------------------------------------------- 1 file changed, 103 deletions(-) delete mode 100755 build.mk (limited to 'build.mk') diff --git a/build.mk b/build.mk deleted file mode 100755 index a8f46525c..000000000 --- a/build.mk +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/make -f -# default target -all: - -# output directory can be set with O:=dir -ifeq ($(O),) - O := . -endif -srcdir := src -include src/Makefile.am -mpd_SRC := $(addprefix src/,$(filter %.c,$(mpd_SOURCES))) -mpd_HDR := $(addprefix src/,$(filter %.h,$(mpd_SOURCES))) -mpd_OBJ := $(subst .c,.o,$(addprefix $(O)/,$(mpd_SRC))) -mpd_DEP := $(subst .o,.d,$(mpd_OBJ)) - --include $(mpd_DEP) - -uname_s := $(shell uname -s | tr A-Z a-z 2>/dev/null || echo unknown) -uname_m := $(shell uname -m | tr A-Z a-z 2>/dev/null || echo unknown) - -# build: the machine type this builds on -# HOST: the machine this runs on -build := $(uname_s)-$(uname_m) -HOST ?= $(build) --include $(O)/config.mk --include $(O)/config_detected.mk -include bs/deps-audio.mk -include bs/deps-input.mk -include bs/deps-misc.mk -include bs/deps-conflicts.mk - -RANLIB ?= ranlib -ifneq ($(HOST),$(build)) - ifeq ($(origin CC),default) - CC := $(HOST)-$(CC) - endif - ifeq ($(origin RANLIB),default) - RANLIB := $(HOST)-$(RANLIB) - endif - ifeq ($(origin AR),default) - AR := $(HOST)-$(AR) - endif -endif - -mpd_CFLAGS += -I$(O)/src -I$(O) -mpd_LDFLAGS += -lm -mpd_DIRS := $(O)/src/inputPlugins $(O)/src/audioOutputs - -STRIP ?= strip -export O CC CPPFLAGS CFLAGS HOST SHELL - -defconfig: $(O)/config.mk - -$(O)/config.mk: - @test -d "$(@D)" || $(SHELL) ./bs/mkdir_p.sh "$(@D)" - @if ! test -e $@; then \ - sed -e 's/@@HOST@@/$(HOST)/g' \ - < bs/config.mk.default > $@+ && mv $@+ $@ && \ - echo Please edit $(O)/config.mk to your liking; fi - @touch $@ - -$(O)/src/../config.h: $(O)/config.h -$(O)/config.h: $(O)/config.mk $(O)/config_detected.h - $(MAKE) -f bs/mkconfig.h.mk $(O)/config.h - -$(O)/config_detected.h: - @test -d "$(@D)" || $(SHELL) ./bs/mkdir_p.sh "$(@D)" - > $@+ && $(SHELL) ./bs/mkconfig-header.sh >> $@+ && \ - $(SHELL) ./bs/cross-arch.sh >> $@+ && mv $@+ $@ - -all: $(O)/src/mpd - @echo OK $< -strip: $(O)/src/mpd - $(STRIP) $(STRIP_OPTS) $< -$(O)/src/mpd: $(mpd_OBJ) - $(CC) -o $@ $^ $(CFLAGS) $(mpd_CFLAGS) $(LDFLAGS) $(mpd_LDFLAGS) -$(O)/src/%.o: src/%.c $(O)/config.h - @HDR_DEP_HACK="$(O)/config.h $(mpd_HDR)" \ - CFLAGS="$(CFLAGS) $(mpd_CFLAGS)" \ - $(SHELL) ./bs/mkdep.sh $< $(dir $<) $(subst .o,.d,$@) - $(CC) $(CPPFLAGS) $(CFLAGS) $(mpd_CFLAGS) -c -o $@ $< -$(mpd_SRC): $(O)/config.h -clean: - $(RM) $(O)/src/mpd $(mpd_OBJ) -reallyclean: clean - $(RM) $(mpd_DEP) $(O)/depmode $(O)/config.h - -# in case a .d file had a dep on a deleted file, we have this: -src/%.h src/%.c:: - @true -# we only do static linking in bs (since our main goal is cross-compiling), -# if you want dynamic linking, use autotools -$(O)/%.a:: - $(RM) $@ - $(AR) cru $@ $^ - $(RANLIB) $@ -dist: - $(SHELL) ./bs/mkdist.sh - -.PHONY: clean reallyclean defconfig all -.PRECIOUS: $(O)/%.h -.SUFFIXES: -.SUFFIXES: .c .o .h .d -- cgit v1.2.3