From 4225dc819c9e6f82d14078414e8b3e7ac8bc6d9a Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Mon, 2 Oct 2023 14:49:26 +0200 Subject: [PATCH] Remove Makefile Remove the Makefile and all the references in the README and CI scripts. Signed-off-by: Neil Armstrong --- .github/workflows/ci.yml | 26 +++++++++----------- Makefile | 51 ---------------------------------------- README | 7 ++---- ci/archlinux.sh | 1 - ci/debian.sh | 1 - ci/fedora.sh | 1 - 6 files changed, 13 insertions(+), 74 deletions(-) delete mode 100644 Makefile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16775ae..e3f1532 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,8 @@ jobs: - ubuntu:jammy - ubuntu:focal - ubuntu:bionic - - ubuntu:xenial + # Meson version on Ubuntu Xenial is really too old + #- ubuntu:xenial cross_compile: [""] variant: [""] include: @@ -56,7 +57,7 @@ jobs: - container: "debian:testing" arch: i386 family: x86 - compiler: gcc -m32 + compiler: gcc cross_compile: i686-linux-gnu pkg_config_path: /usr/lib/i386-linux-gnu/pkgconfig variant: i386 @@ -64,7 +65,7 @@ jobs: - container: "debian:stable" arch: i386 family: x86 - compiler: gcc -m32 + compiler: gcc cross_compile: i686-linux-gnu pkg_config_path: /usr/lib/i386-linux-gnu/pkgconfig variant: i386 @@ -72,7 +73,7 @@ jobs: - container: "debian:bookworm" arch: i386 family: x86 - compiler: gcc -m32 + compiler: gcc cross_compile: i686-linux-gnu pkg_config_path: /usr/lib/i386-linux-gnu/pkgconfig variant: i386 @@ -203,13 +204,13 @@ jobs: # i386 build on x86_64 only requires passing -m32 to CFLAGS & LDFLAGS - name: Meson init for i386 - if: ${{ matrix.container != 'ubuntu:xenial' && matrix.variant == 'i386' }} + if: ${{ matrix.variant == 'i386' }} run: | mkdir build CFLAGS="-m32" LDFLAGS="-m32" meson setup . build - name: Meson init with cross compile - if: ${{ matrix.container != 'ubuntu:xenial' && matrix.variant == 'cross-compile' }} + if: ${{ matrix.variant == 'cross-compile' }} run: | # Generate cross compile file (see https://mesonbuild.com/Cross-compilation.html#cross-compilation) echo "[binaries]" > cross.txt @@ -229,18 +230,13 @@ jobs: meson setup --cross-file cross.txt . build - name: Meson init - if: ${{ matrix.container != 'ubuntu:xenial' && matrix.variant == '' }} + if: ${{ matrix.variant == '' }} run: | mkdir build - # Ubuntu Xenial Meson version doesn't support meson setup, so use old way by default - meson . build - - - name: Ninja build - if: ${{ matrix.container != 'ubuntu:xenial' }} - run: ninja -C build + meson setup . build - name: Compile - run: make -j$(nproc) + run: ninja -C build - name: Install - run: make install + run: ninja -C build install diff --git a/Makefile b/Makefile deleted file mode 100644 index ec8d1cb..0000000 --- a/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -CLIENT := cdba -SERVER := cdba-server - -.PHONY: all - -all: $(CLIENT) $(SERVER) - -CFLAGS := -Wall -g -O2 -# Wextra without few warnings -CFLAGS := $(CFLAGS) -Wextra -Wno-unused-parameter -Wno-unused-result -Wno-missing-field-initializers -Wno-sign-compare - -# Few clang version still have warnings so fail only on GCC -GCC_CFLAGS := -Werror -GCC_CFLAGS += -Wformat-signedness -Wnull-dereference -Wduplicated-cond -Wduplicated-branches -Wvla-larger-than=1 -GCC_CFLAGS += -Walloc-zero -Wstringop-truncation -Wdouble-promotion -Wshadow -Wunsafe-loop-optimizations -GCC_CFLAGS += -Wpointer-arith -Wcast-align -Wwrite-strings -Wlogical-op -Wstrict-overflow=4 -Wundef -Wjump-misses-init -CLANG_CFLAGS := -Wnull-dereference -Wdouble-promotion -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-overflow=4 -Wundef -# TODO: -# GCC_CFLAGS += -Wcast-qual -# CLANG_CFLAGS += -Wcast-qual -Wcast-align -ifeq ($(CC),cc) - CFLAGS += $(GCC_CFLAGS) -else ifeq ($(CC),clang) - CFLAGS += $(CLANG_CFLAGS) -else - $(info No compiler flags for: $(CC)) -endif - -LIBFTDI := $(shell pkg-config --exists libftdi1 && echo libftdi1 || echo libftdi) - -CPPFLAGS := $(shell pkg-config --cflags yaml-0.1 $(LIBFTDI) libudev) -LDFLAGS := $(shell pkg-config --libs yaml-0.1 $(LIBFTDI) libudev) - -CLIENT_SRCS := cdba.c circ_buf.c -CLIENT_OBJS := $(CLIENT_SRCS:.c=.o) - -SERVER_SRCS := cdba-server.c cdb_assist.c circ_buf.c conmux.c device.c device_parser.c fastboot.c alpaca.c ftdi-gpio.c console.c qcomlt_dbg.c ppps.c -SERVER_OBJS := $(SERVER_SRCS:.c=.o) - -$(CLIENT): $(CLIENT_OBJS) - $(CC) $(LDFLAGS) -o $@ $^ - -$(SERVER): $(SERVER_OBJS) - $(CC) -o $@ $^ $(LDFLAGS) - -clean: - rm -f $(CLIENT) $(CLIENT_OBJS) $(SERVER) $(SERVER_OBJS) - -install: $(CLIENT) $(SERVER) - install -D -m 755 $(CLIENT) $(DESTDIR)$(prefix)/bin/$(CLIENT) - install -D -m 755 $(SERVER) $(DESTDIR)$(prefix)/bin/$(SERVER) diff --git a/README b/README index fc41a34..0f0f4cc 100644 --- a/README +++ b/README @@ -3,8 +3,8 @@ The CDBA control tool is used for remotely booting images on development boards attached using a CDB Assist [https://github.com/sonyxperiadev/CDB-Assist] or Conmux. = Dependencies -sudo apt-get install libudev-dev libyaml-dev libftdi1-dev for debian systems -dnf install systemd-devel libyaml-devel libftdi1-devel for fedora systems +sudo apt-get install libudev-dev libyaml-dev libftdi1-dev pkg-config meson for debian systems +dnf install systemd-devel libyaml-devel libftdi1-devel pkg-config meson for fedora systems = Device side On the host with the CDB Assist or Conmux attached the "cdba-server" executable is run @@ -12,9 +12,6 @@ from sandbox/cdba/cdba-server. Available devices are read from $HOME/.cdba = Build instructions -Either use make directly: -# make -or use the Meson build system: # meson . build # ninja -C build diff --git a/ci/archlinux.sh b/ci/archlinux.sh index 3e7b7e4..037794a 100755 --- a/ci/archlinux.sh +++ b/ci/archlinux.sh @@ -20,7 +20,6 @@ pacman -Syu --noconfirm \ libftdi-compat \ libyaml \ systemd-libs \ - make \ pkgconf \ meson \ $PKGS_CC diff --git a/ci/debian.sh b/ci/debian.sh index 0b66de9..8683ab9 100755 --- a/ci/debian.sh +++ b/ci/debian.sh @@ -32,7 +32,6 @@ apt install -y --no-install-recommends \ libftdi-dev \ libudev-dev \ libyaml-dev \ - make \ meson \ $PKGS_CC diff --git a/ci/fedora.sh b/ci/fedora.sh index 4bd34c5..720c88a 100755 --- a/ci/fedora.sh +++ b/ci/fedora.sh @@ -20,7 +20,6 @@ dnf -y install \ libftdi-devel \ libudev-devel \ libyaml-devel \ - make \ meson \ $PKGS_CC