diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-11-27 17:53:50 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-11-27 18:04:04 +0400 |
commit | c0eac03e8ce1b9a743231f2fe21e7cb579fc9339 (patch) | |
tree | b5e30c908f8559ee04a793b312855b742939a68d | |
parent | d61b5d71fbb4259989f830692d15a6367ce94261 (diff) | |
download | slirp-c0eac03e8ce1b9a743231f2fe21e7cb579fc9339.zip slirp-c0eac03e8ce1b9a743231f2fe21e7cb579fc9339.tar.gz slirp-c0eac03e8ce1b9a743231f2fe21e7cb579fc9339.tar.bz2 |
Remove the QEMU-special make build-system
Since QEMU 5.2, QEMU uses meson and handle the build itelf before it
starts using libslirp as a subproject.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r-- | .gitlab-ci.yml | 12 | ||||
-rw-r--r-- | Makefile | 62 | ||||
-rw-r--r-- | README.md | 2 |
3 files changed, 6 insertions, 70 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0521944..46e58a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,14 @@ image: fedora:latest variables: - DEPS: meson ninja-build make + DEPS: meson ninja-build gcc pkg-config glib2-devel mingw64-gcc mingw64-pkg-config mingw64-glib2 clang-analyzer git-core before_script: - dnf install -y $DEPS + - git fetch --tags https://gitlab.freedesktop.org/slirp/libslirp.git - git describe build: @@ -22,10 +23,6 @@ build-mingw64: - (mkdir buildw && cd buildw && mingw64-meson --werror) || (cat buildw/meson-logs/meson-log.txt && exit 1) - ninja -C buildw -build-qemu: - script: - - make BUILD_DIR=build - Coverity: only: refs: @@ -33,11 +30,12 @@ Coverity: - coverity script: - dnf update -y - - dnf install -y make curl clang + - dnf install -y curl clang - curl -o /tmp/cov-analysis-linux64.tgz https://scan.coverity.com/download/linux64 --form project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN - tar xfz /tmp/cov-analysis-linux64.tgz - - cov-analysis-linux64-*/bin/cov-build --dir cov-int make -j4 CC=clang + - CC=clang meson build + - cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja -C build - tar cfz cov-int.tar.gz cov-int - curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL diff --git a/Makefile b/Makefile deleted file mode 100644 index 1e48f35..0000000 --- a/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) -BUILD_DIR ?= . - -LIBSLIRP = $(BUILD_DIR)/libslirp.a -SLIRP_MAJOR_VERSION = 4 -SLIRP_MINOR_VERSION = 3 -SLIRP_MICRO_VERSION = 1 -SLIRP_VERSION_STRING = "$(SLIRP_MAJOR_VERSION).$(SLIRP_MINOR_VERSION).$(SLIRP_MICRO_VERSION)-git" - -all: $(LIBSLIRP) - -SRCS := $(wildcard src/*.c) -OBJS := $(SRCS:%.c=$(BUILD_DIR)/%.o) -DEPS := $(OBJS:%.o=%.d) - -INC_DIRS := $(BUILD_DIR)/src -INC_FLAGS := $(addprefix -I,$(INC_DIRS)) - -override CFLAGS += \ - -DG_LOG_DOMAIN='"Slirp"' \ - $(shell $(PKG_CONFIG) --cflags glib-2.0) \ - $(INC_FLAGS) \ - -MMD -MP -override LDFLAGS += $(shell $(PKG_CONFIG) --libs glib-2.0) - -$(BUILD_DIR)/src/libslirp-version.h: Makefile - @$(MKDIR_P) $(dir $@) - $(call quiet-command,cat $(ROOT_DIR)/src/libslirp-version.h.in | \ - sed 's/@SLIRP_MAJOR_VERSION@/$(SLIRP_MAJOR_VERSION)/' | \ - sed 's/@SLIRP_MINOR_VERSION@/$(SLIRP_MINOR_VERSION)/' | \ - sed 's/@SLIRP_MICRO_VERSION@/$(SLIRP_MICRO_VERSION)/' | \ - sed 's/@SLIRP_VERSION_STRING@/$(SLIRP_VERSION_STRING)/' \ - > $@,"GEN","$@") - -$(OBJS): $(BUILD_DIR)/src/libslirp-version.h - -$(LIBSLIRP): $(OBJS) - -.PHONY: clean - -clean: - rm -r $(OBJS) $(DEPS) $(LIBSLIRP) $(BUILD_DIR)/src/libslirp-version.h - -$(BUILD_DIR)/src/%.o: $(ROOT_DIR)/src/%.c - @$(MKDIR_P) $(dir $@) - $(call quiet-command,$(CC) $(CFLAGS) -c -o $@ $<,"CC","$@") - -%.a: - $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^,"AR","$@") - -PKG_CONFIG ?= pkg-config -MKDIR_P ?= mkdir -p -quiet-command-run = $(if $(V),,$(if $2,printf " %-7s %s\n" $2 $3 && ))$1 -quiet-@ = $(if $(V),,@) -quiet-command = $(quiet-@)$(call quiet-command-run,$1,$2,$3) - -print-%: - @echo '$*=$($*)' - -.SUFFIXES: - --include $(DEPS) @@ -7,7 +7,7 @@ containers or various tools. ### Prerequisites -A C compiler, make/meson and glib2 development libraries. +A C compiler, meson and glib2 development libraries. (see also [.gitlab-ci.yml](.gitlab-ci.yml) DEPS variable for the list of dependencies on Fedora) |