Moved to meson
21 files changed, 47 insertions(+), 601 deletions(-)

M .hgignore
R Debug/makefile => 
R Debug/objects.mk => 
R Debug/plugins/subdir.mk => 
R Debug/proto/subdir.mk => 
R Debug/sources.mk => 
R Debug/src/subdir.mk => 
R GTK4/makefile => 
R GTK4/objects.mk => 
R GTK4/plugins/subdir.mk => 
R GTK4/proto/subdir.mk => 
R GTK4/sources.mk => 
R GTK4/src/subdir.mk => 
M README.md
R Release/makefile => 
R Release/objects.mk => 
R Release/plugins/subdir.mk => 
R Release/proto/subdir.mk => 
R Release/sources.mk => 
R Release/src/subdir.mk => 
A => meson.build
M .hgignore +2 -6
@@ 1,10 1,6 @@ 
 ^\.cproject$
 ^\.project$
 ^\.settings$
-^Debug/rootbar$
-^Release/rootbar$
-^GTK4/rootbar$
-.+\.o$
-.+\.d$
 ^\.hgrepos$
-^Development$
+^build$
+^Debug$

          
R Debug/makefile =>  +0 -45
@@ 1,45 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
--include ../makefile.init
-
-RM := rm -rf
-
-# All of the sources participating in the build are defined here
--include sources.mk
--include src/subdir.mk
--include proto/subdir.mk
--include plugins/subdir.mk
--include subdir.mk
--include objects.mk
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(strip $(C_DEPS)),)
--include $(C_DEPS)
-endif
-endif
-
--include ../makefile.defs
-
-# Add inputs and outputs from these tool invocations to the build variables 
-
-# All Target
-all: rootbar
-
-# Tool invocations
-rootbar: $(OBJS) $(USER_OBJS)
-	@echo 'Building target: $@'
-	@echo 'Invoking: GCC C Linker'
-	gcc -fsanitize=address -rdynamic -pthread -o "rootbar" $(OBJS) $(USER_OBJS) $(LIBS)
-	@echo 'Finished building target: $@'
-	@echo ' '
-
-# Other Targets
-clean:
-	-$(RM) $(EXECUTABLES)$(OBJS)$(C_DEPS) rootbar
-	-@echo ' '
-
-.PHONY: all clean dependents
-
--include ../makefile.targets

          
R Debug/objects.mk =>  +0 -8
@@ 1,8 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-USER_OBJS :=
-
-LIBS := -ldl -lcairo -lgtk-3 -lpulse -lgdk-3 -ljson-c -lgio-2.0 -lglib-2.0 -lgobject-2.0 -lwayland-client -lgdk_pixbuf-2.0 -lpulse-mainloop-glib
-

          
R Debug/plugins/subdir.mk =>  +0 -57
@@ 1,57 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-../plugins/battery.c \
-../plugins/bind_mode.c \
-../plugins/clock.c \
-../plugins/cpu.c \
-../plugins/external.c \
-../plugins/image.c \
-../plugins/memory.c \
-../plugins/notification.c \
-../plugins/text.c \
-../plugins/volume.c \
-../plugins/window.c \
-../plugins/workspace.c 
-
-OBJS += \
-./plugins/battery.o \
-./plugins/bind_mode.o \
-./plugins/clock.o \
-./plugins/cpu.o \
-./plugins/external.o \
-./plugins/image.o \
-./plugins/memory.o \
-./plugins/notification.o \
-./plugins/text.o \
-./plugins/volume.o \
-./plugins/window.o \
-./plugins/workspace.o 
-
-C_DEPS += \
-./plugins/battery.d \
-./plugins/bind_mode.d \
-./plugins/clock.d \
-./plugins/cpu.d \
-./plugins/external.d \
-./plugins/image.d \
-./plugins/memory.d \
-./plugins/notification.d \
-./plugins/text.d \
-./plugins/volume.d \
-./plugins/window.d \
-./plugins/workspace.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-plugins/%.o: ../plugins/%.c
-	@echo 'Building file: $<'
-	@echo 'Invoking: GCC C Compiler'
-	gcc -DDEBUG -D_GNU_SOURCE -I../inc -O0 -g3 -Wall -Wextra -c -fmessage-length=0 -fsanitize=address `pkg-config --cflags gtk+-3.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
-	@echo 'Finished building: $<'
-	@echo ' '
-
-

          
R Debug/proto/subdir.mk =>  +0 -30
@@ 1,30 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-../proto/wlr-layer-shell-unstable-v1-protocol.c \
-../proto/xdg-output-unstable-v1-protocol.c \
-../proto/xdg-shell-protocol.c 
-
-OBJS += \
-./proto/wlr-layer-shell-unstable-v1-protocol.o \
-./proto/xdg-output-unstable-v1-protocol.o \
-./proto/xdg-shell-protocol.o 
-
-C_DEPS += \
-./proto/wlr-layer-shell-unstable-v1-protocol.d \
-./proto/xdg-output-unstable-v1-protocol.d \
-./proto/xdg-shell-protocol.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-proto/%.o: ../proto/%.c
-	@echo 'Building file: $<'
-	@echo 'Invoking: GCC C Compiler'
-	gcc -DDEBUG -D_GNU_SOURCE -I../inc -O0 -g3 -Wall -Wextra -c -fmessage-length=0 -fsanitize=address `pkg-config --cflags gtk+-3.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
-	@echo 'Finished building: $<'
-	@echo ' '
-
-

          
R Debug/sources.mk =>  +0 -19
@@ 1,19 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-OBJ_SRCS := 
-ASM_SRCS := 
-C_SRCS := 
-O_SRCS := 
-S_UPPER_SRCS := 
-EXECUTABLES := 
-OBJS := 
-C_DEPS := 
-
-# Every subdirectory with source files must be described here
-SUBDIRS := \
-plugins \
-proto \
-src \
-

          
R Debug/src/subdir.mk =>  +0 -39
@@ 1,39 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-../src/bar.c \
-../src/config.c \
-../src/main.c \
-../src/map.c \
-../src/sway_ipc.c \
-../src/utils.c 
-
-OBJS += \
-./src/bar.o \
-./src/config.o \
-./src/main.o \
-./src/map.o \
-./src/sway_ipc.o \
-./src/utils.o 
-
-C_DEPS += \
-./src/bar.d \
-./src/config.d \
-./src/main.d \
-./src/map.d \
-./src/sway_ipc.d \
-./src/utils.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-src/%.o: ../src/%.c
-	@echo 'Building file: $<'
-	@echo 'Invoking: GCC C Compiler'
-	gcc -DDEBUG -D_GNU_SOURCE -I../inc -O0 -g3 -Wall -Wextra -c -fmessage-length=0 -fsanitize=address `pkg-config --cflags gtk+-3.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
-	@echo 'Finished building: $<'
-	@echo ' '
-
-

          
R GTK4/makefile =>  +0 -45
@@ 1,45 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
--include ../makefile.init
-
-RM := rm -rf
-
-# All of the sources participating in the build are defined here
--include sources.mk
--include src/subdir.mk
--include proto/subdir.mk
--include plugins/subdir.mk
--include subdir.mk
--include objects.mk
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(strip $(C_DEPS)),)
--include $(C_DEPS)
-endif
-endif
-
--include ../makefile.defs
-
-# Add inputs and outputs from these tool invocations to the build variables 
-
-# All Target
-all: rootbar
-
-# Tool invocations
-rootbar: $(OBJS) $(USER_OBJS)
-	@echo 'Building target: $@'
-	@echo 'Invoking: GCC C Linker'
-	gcc -rdynamic -pthread -o "rootbar" $(OBJS) $(USER_OBJS) $(LIBS)
-	@echo 'Finished building target: $@'
-	@echo ' '
-
-# Other Targets
-clean:
-	-$(RM) $(EXECUTABLES)$(OBJS)$(C_DEPS) rootbar
-	-@echo ' '
-
-.PHONY: all clean dependents
-
--include ../makefile.targets

          
R GTK4/objects.mk =>  +0 -8
@@ 1,8 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-USER_OBJS :=
-
-LIBS := -ldl -lgtk-4 -lpulse -ljson-c -lgio-2.0 -lglib-2.0 -lgobject-2.0 -lwayland-client -lgdk_pixbuf-2.0 -lpulse-mainloop-glib
-

          
R GTK4/plugins/subdir.mk =>  +0 -54
@@ 1,54 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-../plugins/battery.c \
-../plugins/bind_mode.c \
-../plugins/clock.c \
-../plugins/cpu.c \
-../plugins/external.c \
-../plugins/memory.c \
-../plugins/notification.c \
-../plugins/text.c \
-../plugins/volume.c \
-../plugins/window.c \
-../plugins/workspace.c 
-
-OBJS += \
-./plugins/battery.o \
-./plugins/bind_mode.o \
-./plugins/clock.o \
-./plugins/cpu.o \
-./plugins/external.o \
-./plugins/memory.o \
-./plugins/notification.o \
-./plugins/text.o \
-./plugins/volume.o \
-./plugins/window.o \
-./plugins/workspace.o 
-
-C_DEPS += \
-./plugins/battery.d \
-./plugins/bind_mode.d \
-./plugins/clock.d \
-./plugins/cpu.d \
-./plugins/external.d \
-./plugins/memory.d \
-./plugins/notification.d \
-./plugins/text.d \
-./plugins/volume.d \
-./plugins/window.d \
-./plugins/workspace.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-plugins/%.o: ../plugins/%.c
-	@echo 'Building file: $<'
-	@echo 'Invoking: GCC C Compiler'
-	gcc -DGTK4 -D_GNU_SOURCE -I../inc -O3 -Wall -Wextra -c -fmessage-length=0 `pkg-config --cflags gtk+-4.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
-	@echo 'Finished building: $<'
-	@echo ' '
-
-

          
R GTK4/proto/subdir.mk =>  +0 -30
@@ 1,30 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-../proto/wlr-layer-shell-unstable-v1-protocol.c \
-../proto/xdg-output-unstable-v1-protocol.c \
-../proto/xdg-shell-protocol.c 
-
-OBJS += \
-./proto/wlr-layer-shell-unstable-v1-protocol.o \
-./proto/xdg-output-unstable-v1-protocol.o \
-./proto/xdg-shell-protocol.o 
-
-C_DEPS += \
-./proto/wlr-layer-shell-unstable-v1-protocol.d \
-./proto/xdg-output-unstable-v1-protocol.d \
-./proto/xdg-shell-protocol.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-proto/%.o: ../proto/%.c
-	@echo 'Building file: $<'
-	@echo 'Invoking: GCC C Compiler'
-	gcc -DGTK4 -D_GNU_SOURCE -I../inc -O3 -Wall -Wextra -c -fmessage-length=0 `pkg-config --cflags gtk+-4.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
-	@echo 'Finished building: $<'
-	@echo ' '
-
-

          
R GTK4/sources.mk =>  +0 -19
@@ 1,19 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-OBJ_SRCS := 
-ASM_SRCS := 
-C_SRCS := 
-O_SRCS := 
-S_UPPER_SRCS := 
-EXECUTABLES := 
-OBJS := 
-C_DEPS := 
-
-# Every subdirectory with source files must be described here
-SUBDIRS := \
-plugins \
-proto \
-src \
-

          
R GTK4/src/subdir.mk =>  +0 -39
@@ 1,39 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-../src/bar.c \
-../src/config.c \
-../src/main.c \
-../src/map.c \
-../src/sway_ipc.c \
-../src/utils.c 
-
-OBJS += \
-./src/bar.o \
-./src/config.o \
-./src/main.o \
-./src/map.o \
-./src/sway_ipc.o \
-./src/utils.o 
-
-C_DEPS += \
-./src/bar.d \
-./src/config.d \
-./src/main.d \
-./src/map.d \
-./src/sway_ipc.d \
-./src/utils.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-src/%.o: ../src/%.c
-	@echo 'Building file: $<'
-	@echo 'Invoking: GCC C Compiler'
-	gcc -DGTK4 -D_GNU_SOURCE -I../inc -O3 -Wall -Wextra -c -fmessage-length=0 `pkg-config --cflags gtk+-4.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
-	@echo 'Finished building: $<'
-	@echo ' '
-
-

          
M README.md +6 -4
@@ 8,14 8,16 @@ Root Bar is a bar for wlroots based wayl
 	libjson-c-dev
 	libpulse-dev
 	pkg-config
+	meson
 ## Building
 	hg clone https://hg.sr.ht/~scoopta/rootbar
-	cd rootbar/Release
-	make
+	cd rootbar
+	meson build
+	ninja -C build
 ## Installing
-	sudo cp rootbar /usr/bin
+	sudo ninja -C build install
 ## Uninstalling
-	sudo rm /usr/bin/rootbar
+	sudo ninja -C build uninstall
 ## Documentation
 You can find documentation at https://bitbucket.org/Scoopta/root-bar/wiki/browse/
 

          
R Release/makefile =>  +0 -45
@@ 1,45 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
--include ../makefile.init
-
-RM := rm -rf
-
-# All of the sources participating in the build are defined here
--include sources.mk
--include src/subdir.mk
--include proto/subdir.mk
--include plugins/subdir.mk
--include subdir.mk
--include objects.mk
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(strip $(C_DEPS)),)
--include $(C_DEPS)
-endif
-endif
-
--include ../makefile.defs
-
-# Add inputs and outputs from these tool invocations to the build variables 
-
-# All Target
-all: rootbar
-
-# Tool invocations
-rootbar: $(OBJS) $(USER_OBJS)
-	@echo 'Building target: $@'
-	@echo 'Invoking: GCC C Linker'
-	gcc -rdynamic -pthread -o "rootbar" $(OBJS) $(USER_OBJS) $(LIBS)
-	@echo 'Finished building target: $@'
-	@echo ' '
-
-# Other Targets
-clean:
-	-$(RM) $(EXECUTABLES)$(OBJS)$(C_DEPS) rootbar
-	-@echo ' '
-
-.PHONY: all clean dependents
-
--include ../makefile.targets

          
R Release/objects.mk =>  +0 -8
@@ 1,8 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-USER_OBJS :=
-
-LIBS := -ldl -lcairo -lgtk-3 -lpulse -lgdk-3 -ljson-c -lgio-2.0 -lglib-2.0 -lgobject-2.0 -lwayland-client -lgdk_pixbuf-2.0 -lpulse-mainloop-glib
-

          
R Release/plugins/subdir.mk =>  +0 -57
@@ 1,57 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-../plugins/battery.c \
-../plugins/bind_mode.c \
-../plugins/clock.c \
-../plugins/cpu.c \
-../plugins/external.c \
-../plugins/image.c \
-../plugins/memory.c \
-../plugins/notification.c \
-../plugins/text.c \
-../plugins/volume.c \
-../plugins/window.c \
-../plugins/workspace.c 
-
-OBJS += \
-./plugins/battery.o \
-./plugins/bind_mode.o \
-./plugins/clock.o \
-./plugins/cpu.o \
-./plugins/external.o \
-./plugins/image.o \
-./plugins/memory.o \
-./plugins/notification.o \
-./plugins/text.o \
-./plugins/volume.o \
-./plugins/window.o \
-./plugins/workspace.o 
-
-C_DEPS += \
-./plugins/battery.d \
-./plugins/bind_mode.d \
-./plugins/clock.d \
-./plugins/cpu.d \
-./plugins/external.d \
-./plugins/image.d \
-./plugins/memory.d \
-./plugins/notification.d \
-./plugins/text.d \
-./plugins/volume.d \
-./plugins/window.d \
-./plugins/workspace.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-plugins/%.o: ../plugins/%.c
-	@echo 'Building file: $<'
-	@echo 'Invoking: GCC C Compiler'
-	gcc -D_GNU_SOURCE -I../inc -O3 -Wall -Wextra -c -fmessage-length=0 `pkg-config --cflags gtk+-3.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
-	@echo 'Finished building: $<'
-	@echo ' '
-
-

          
R Release/proto/subdir.mk =>  +0 -30
@@ 1,30 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-../proto/wlr-layer-shell-unstable-v1-protocol.c \
-../proto/xdg-output-unstable-v1-protocol.c \
-../proto/xdg-shell-protocol.c 
-
-OBJS += \
-./proto/wlr-layer-shell-unstable-v1-protocol.o \
-./proto/xdg-output-unstable-v1-protocol.o \
-./proto/xdg-shell-protocol.o 
-
-C_DEPS += \
-./proto/wlr-layer-shell-unstable-v1-protocol.d \
-./proto/xdg-output-unstable-v1-protocol.d \
-./proto/xdg-shell-protocol.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-proto/%.o: ../proto/%.c
-	@echo 'Building file: $<'
-	@echo 'Invoking: GCC C Compiler'
-	gcc -D_GNU_SOURCE -I../inc -O3 -Wall -Wextra -c -fmessage-length=0 `pkg-config --cflags gtk+-3.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
-	@echo 'Finished building: $<'
-	@echo ' '
-
-

          
R Release/sources.mk =>  +0 -19
@@ 1,19 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-OBJ_SRCS := 
-ASM_SRCS := 
-C_SRCS := 
-O_SRCS := 
-S_UPPER_SRCS := 
-EXECUTABLES := 
-OBJS := 
-C_DEPS := 
-
-# Every subdirectory with source files must be described here
-SUBDIRS := \
-plugins \
-proto \
-src \
-

          
R Release/src/subdir.mk =>  +0 -39
@@ 1,39 0,0 @@ 
-################################################################################
-# Automatically-generated file. Do not edit!
-################################################################################
-
-# Add inputs and outputs from these tool invocations to the build variables 
-C_SRCS += \
-../src/bar.c \
-../src/config.c \
-../src/main.c \
-../src/map.c \
-../src/sway_ipc.c \
-../src/utils.c 
-
-OBJS += \
-./src/bar.o \
-./src/config.o \
-./src/main.o \
-./src/map.o \
-./src/sway_ipc.o \
-./src/utils.o 
-
-C_DEPS += \
-./src/bar.d \
-./src/config.d \
-./src/main.d \
-./src/map.d \
-./src/sway_ipc.d \
-./src/utils.d 
-
-
-# Each subdirectory must supply rules for building sources it contributes
-src/%.o: ../src/%.c
-	@echo 'Building file: $<'
-	@echo 'Invoking: GCC C Compiler'
-	gcc -D_GNU_SOURCE -I../inc -O3 -Wall -Wextra -c -fmessage-length=0 `pkg-config --cflags gtk+-3.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
-	@echo 'Finished building: $<'
-	@echo ' '
-
-

          
A => meson.build +39 -0
@@ 0,0 1,39 @@ 
+project('rootbar', 'c', default_options : ['buildtype=release', 'warning_level=2'])
+cc = meson.get_compiler('c')
+
+inc = include_directories('inc')
+gtk = dependency('gtk+-3.0')
+json = dependency('json-c')
+pulse = dependency('libpulse')
+pulse_mainloop = dependency('libpulse-mainloop-glib')
+threads = dependency('threads')
+wayland = dependency('wayland-client')
+dl = cc.find_library('dl')
+
+add_project_arguments('-D_GNU_SOURCE', language : 'c')
+add_project_link_arguments('-rdynamic', language : 'c')
+
+executable(meson.project_name(),
+'src/bar.c',
+'src/config.c',
+'src/main.c',
+'src/map.c',
+'src/sway_ipc.c',
+'src/utils.c',
+'plugins/battery.c',
+'plugins/bind_mode.c',
+'plugins/clock.c',
+'plugins/cpu.c',
+'plugins/external.c',
+'plugins/image.c',
+'plugins/memory.c',
+'plugins/notification.c',
+'plugins/text.c',
+'plugins/volume.c',
+'plugins/window.c',
+'plugins/workspace.c',
+'proto/wlr-layer-shell-unstable-v1-protocol.c',
+'proto/xdg-output-unstable-v1-protocol.c',
+'proto/xdg-shell-protocol.c',
+include_directories : inc,
+dependencies : [gtk, json, pulse, pulse_mainloop, threads, wayland, dl], install : true)