From 03c62d6ef522849663def173fea96bcbcd9423c7 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Sat, 12 Oct 2019 15:25:35 +0000 Subject: [PATCH] Remove makefiles --- Makefile | 43 --------------------------------------- common.mk | 50 ---------------------------------------------- protocols/Makefile | 26 ------------------------ 3 files changed, 119 deletions(-) delete mode 100644 Makefile delete mode 100644 common.mk delete mode 100644 protocols/Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index 5c2428c..0000000 --- a/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -DEPENDENCIES := libuv egl glesv2 wayland-client neatvnc pixman-1 - -EXEC := wayvnc - -SOURCES := \ - src/main.c \ - src/render.c \ - src/dmabuf.c \ - src/strlcpy.c \ - src/shm.c \ - src/screencopy.c \ - -include common.mk - -PROTOCOLS := \ - $(BUILD_DIR)/proto-wlr-export-dmabuf-unstable-v1.o \ - $(BUILD_DIR)/proto-wlr-screencopy-unstable-v1.o \ - -VERSION=0.0.0 - -ifndef DONT_STRIP - INSTALL_STRIP := -s --strip-program=$(STRIP) -endif - -all: $(BUILD_DIR)/$(EXEC) | proto - -$(BUILD_DIR)/%.o: src/%.c | $(BUILD_DIR) ; $(CC_OBJ) -$(BUILD_DIR)/proto-%.o: protocols/build/%.c | $(BUILD_DIR) ; $(CC_OBJ) -$(BUILD_DIR)/$(EXEC): $(OBJECTS) $(PROTOCOLS) | $(BUILD_DIR) ; $(LINK_EXE) - -.PHONY: install -install: $(EXEC) - install $(INSTALL_STRIP) -Dt $(DESTDIR)$(PREFIX)/bin $(BUILD_DIR)/$(EXEC) - -.PHONY: proto -proto: - make -C protocols - -.PHONY: proto_clean -proto_clean: - make -C protocols clean - -clean: proto_clean diff --git a/common.mk b/common.mk deleted file mode 100644 index 93d1365..0000000 --- a/common.mk +++ /dev/null @@ -1,50 +0,0 @@ -MACHINE := $(shell $(CC) -dumpmachine) -ARCH := $(firstword $(subst -, ,$(MACHINE))) -BUILD_DIR ?= build-$(MACHINE) - -PREFIX ?= /usr/local - -ifeq ($(ARCH),x86_64) - ARCH_CFLAGS := -mavx -else -ifeq ($(ARCH),arm) - ARCH_CFLAGS := -mfpu=neon -endif # end arm block -endif # end x86_64 block - -ifeq (, $(shell which $(MACHINE)-strip 2>/dev/null)) - STRIP ?= strip -else - STRIP ?= $(MACHINE)-strip -endif - -ifeq (, $(shell which $(MACHINE)-pkg-config 2>/dev/null)) - PKGCONFIG ?= pkg-config -else - PKGCONFIG ?= $(MACHINE)-pkg-config -endif - -CFLAGS ?= -g -O3 $(ARCH_CFLAGS) -flto -DNDEBUG -LDFLAGS ?= -flto - -CFLAGS += -std=gnu11 -D_GNU_SOURCE -Iinclude -Iprotocols/build - -CC_OBJ = $(CC) -c $(CFLAGS) $< -o $@ -MMD -MP -MF $(@:.o=.deps) -LINK_EXE = $(CC) $^ $(LDFLAGS) -o $@ - -CFLAGS += $(foreach dep,$(DEPENDENCIES),$(shell $(PKGCONFIG) --cflags $(dep))) -LDFLAGS += $(foreach dep,$(DEPENDENCIES),$(shell $(PKGCONFIG) --libs $(dep))) -OBJECTS := $(SOURCES:src/%.c=$(BUILD_DIR)/%.o) - -$(BUILD_DIR): ; mkdir -p $(BUILD_DIR) - -.PHONY: clean -clean: ; rm -rf $(BUILD_DIR) - --include $(BUILD_DIR)/*.deps - -.SUFFIXES: -.SECONDARY: - -# This clears the default target set by this file -.DEFAULT_GOAL := diff --git a/protocols/Makefile b/protocols/Makefile deleted file mode 100644 index d5b2268..0000000 --- a/protocols/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -WAYLAND_SCANNER ?= wayland-scanner - -PROTOCOLS := \ - wlr-export-dmabuf-unstable-v1.xml \ - wlr-screencopy-unstable-v1.xml \ - -SOURCES := $(PROTOCOLS:%.xml=build/%.c) -HEADERS := $(PROTOCOLS:%.xml=build/%.h) - -all: $(SOURCES) $(HEADERS) - -build: - mkdir -p build - -build/%.c: %.xml | build - $(WAYLAND_SCANNER) private-code $< $@ - -build/%.h: %.xml | build - $(WAYLAND_SCANNER) client-header $< $@ - -.PHONY: clean -clean: - rm -rf build - -.SUFFIXES: -.SECONDARY: