aboutsummaryrefslogtreecommitdiffstats
path: root/build.mk
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-16 15:00:00 +0200
committerMax Kellermann <max@duempel.org>2008-10-16 15:00:00 +0200
commitc0a9ef980f94f12fdd9ba7d1949b2a05111b5ade (patch)
tree701f519b553d9f94ac396183146cd9f37cd55397 /build.mk
parent9b5ce27c3b517c501bb13a534d50476e11751262 (diff)
downloadmpd-c0a9ef980f94f12fdd9ba7d1949b2a05111b5ade.tar.gz
mpd-c0a9ef980f94f12fdd9ba7d1949b2a05111b5ade.tar.xz
mpd-c0a9ef980f94f12fdd9ba7d1949b2a05111b5ade.zip
removed the "bs" build scripts
autotools are somewhat ugly, but that doesn't justify duplicating its effort with another complex build system.
Diffstat (limited to 'build.mk')
-rwxr-xr-xbuild.mk103
1 files changed, 0 insertions, 103 deletions
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