diff --git a/.build.yml b/.build.yml index 84dc3f4..54cf29f 100644 --- a/.build.yml +++ b/.build.yml @@ -4,8 +4,10 @@ packages: - libwayland-dev - libgtk-3-dev - pkg-config + - meson tasks: - build: | - cd wofi/Release - make + cd wofi + meson build + ninja -C build diff --git a/.hgignore b/.hgignore index 4687274..01326ac 100644 --- a/.hgignore +++ b/.hgignore @@ -1,8 +1,7 @@ ^\.cproject$ ^\.project$ ^\.settings$ -^Debug/wofi$ -^Release/wofi$ +^build$ .+\.o$ .+\.d$ ^\.hgrepos$ diff --git a/Debug/makefile b/Debug/makefile deleted file mode 100644 index 00b9911..0000000 --- a/Debug/makefile +++ /dev/null @@ -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 modes/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: wofi - -# Tool invocations -wofi: $(OBJS) $(USER_OBJS) - @echo 'Building target: $@' - @echo 'Invoking: GCC C Linker' - gcc -fsanitize=address -rdynamic -pthread -o "wofi" $(OBJS) $(USER_OBJS) $(LIBS) - @echo 'Finished building target: $@' - @echo ' ' - -# Other Targets -clean: - -$(RM) $(EXECUTABLES)$(OBJS)$(C_DEPS) wofi - -@echo ' ' - -.PHONY: all clean dependents - --include ../makefile.targets diff --git a/Debug/modes/subdir.mk b/Debug/modes/subdir.mk deleted file mode 100644 index eb3297d..0000000 --- a/Debug/modes/subdir.mk +++ /dev/null @@ -1,30 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -C_SRCS += \ -../modes/dmenu.c \ -../modes/drun.c \ -../modes/run.c - -OBJS += \ -./modes/dmenu.o \ -./modes/drun.o \ -./modes/run.o - -C_DEPS += \ -./modes/dmenu.d \ -./modes/drun.d \ -./modes/run.d - - -# Each subdirectory must supply rules for building sources it contributes -modes/%.o: ../modes/%.c - @echo 'Building file: $<' - @echo 'Invoking: GCC C Compiler' - gcc -D_GNU_SOURCE -DVERSION='"'"`hg identify`"'"' -I../inc -O0 -g3 -Wall -Wextra -c -fmessage-length=0 -fsanitize=address `pkg-config --cflags gtk+-3.0 gio-unix-2.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Debug/objects.mk b/Debug/objects.mk deleted file mode 100644 index a19371c..0000000 --- a/Debug/objects.mk +++ /dev/null @@ -1,8 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -USER_OBJS := - -LIBS := -ldl -lgtk-3 -lgdk-3 -lgio-2.0 -lglib-2.0 -lpango-1.0 -lgobject-2.0 -lwayland-client -lgdk_pixbuf-2.0 - diff --git a/Debug/proto/subdir.mk b/Debug/proto/subdir.mk deleted file mode 100644 index 9e22e2f..0000000 --- a/Debug/proto/subdir.mk +++ /dev/null @@ -1,27 +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-shell-protocol.c - -OBJS += \ -./proto/wlr-layer-shell-unstable-v1-protocol.o \ -./proto/xdg-shell-protocol.o - -C_DEPS += \ -./proto/wlr-layer-shell-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 -DVERSION='"'"`hg identify`"'"' -I../inc -O0 -g3 -Wall -Wextra -c -fmessage-length=0 -fsanitize=address `pkg-config --cflags gtk+-3.0 gio-unix-2.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Debug/sources.mk b/Debug/sources.mk deleted file mode 100644 index e145ff6..0000000 --- a/Debug/sources.mk +++ /dev/null @@ -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 := \ -modes \ -proto \ -src \ - diff --git a/Debug/src/subdir.mk b/Debug/src/subdir.mk deleted file mode 100644 index bf92938..0000000 --- a/Debug/src/subdir.mk +++ /dev/null @@ -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/config.c \ -../src/main.c \ -../src/map.c \ -../src/property_box.c \ -../src/utils.c \ -../src/wofi.c - -OBJS += \ -./src/config.o \ -./src/main.o \ -./src/map.o \ -./src/property_box.o \ -./src/utils.o \ -./src/wofi.o - -C_DEPS += \ -./src/config.d \ -./src/main.d \ -./src/map.d \ -./src/property_box.d \ -./src/utils.d \ -./src/wofi.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 -DVERSION='"'"`hg identify`"'"' -I../inc -O0 -g3 -Wall -Wextra -c -fmessage-length=0 -fsanitize=address `pkg-config --cflags gtk+-3.0 gio-unix-2.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/README.md b/README.md index c77230e..38ce4c4 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,14 @@ If you're having issues with -i not showing images refer to https://todo.sr.ht/~ libwayland-dev libgtk-3-dev pkg-config + meson ## Building hg clone https://hg.sr.ht/~scoopta/wofi - cd wofi/Release - make + cd wofi + meson build + ninja -C build ## Installing - sudo cp wofi /usr/bin + sudo cp build/wofi /usr/bin ## Uninstalling sudo rm /usr/bin/wofi ## Bug Reports diff --git a/Release/makefile b/Release/makefile deleted file mode 100644 index 3a8898a..0000000 --- a/Release/makefile +++ /dev/null @@ -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 modes/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: wofi - -# Tool invocations -wofi: $(OBJS) $(USER_OBJS) - @echo 'Building target: $@' - @echo 'Invoking: GCC C Linker' - gcc -rdynamic -pthread -o "wofi" $(OBJS) $(USER_OBJS) $(LIBS) - @echo 'Finished building target: $@' - @echo ' ' - -# Other Targets -clean: - -$(RM) $(EXECUTABLES)$(OBJS)$(C_DEPS) wofi - -@echo ' ' - -.PHONY: all clean dependents - --include ../makefile.targets diff --git a/Release/modes/subdir.mk b/Release/modes/subdir.mk deleted file mode 100644 index a8dd98e..0000000 --- a/Release/modes/subdir.mk +++ /dev/null @@ -1,30 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -C_SRCS += \ -../modes/dmenu.c \ -../modes/drun.c \ -../modes/run.c - -OBJS += \ -./modes/dmenu.o \ -./modes/drun.o \ -./modes/run.o - -C_DEPS += \ -./modes/dmenu.d \ -./modes/drun.d \ -./modes/run.d - - -# Each subdirectory must supply rules for building sources it contributes -modes/%.o: ../modes/%.c - @echo 'Building file: $<' - @echo 'Invoking: GCC C Compiler' - gcc -D_GNU_SOURCE -DVERSION='"'"`hg identify`"'"' -I../inc -O3 -Wall -Wextra -c -fmessage-length=0 `pkg-config --cflags gtk+-3.0 gio-unix-2.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Release/objects.mk b/Release/objects.mk deleted file mode 100644 index a19371c..0000000 --- a/Release/objects.mk +++ /dev/null @@ -1,8 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -USER_OBJS := - -LIBS := -ldl -lgtk-3 -lgdk-3 -lgio-2.0 -lglib-2.0 -lpango-1.0 -lgobject-2.0 -lwayland-client -lgdk_pixbuf-2.0 - diff --git a/Release/proto/subdir.mk b/Release/proto/subdir.mk deleted file mode 100644 index e7edc5a..0000000 --- a/Release/proto/subdir.mk +++ /dev/null @@ -1,27 +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-shell-protocol.c - -OBJS += \ -./proto/wlr-layer-shell-unstable-v1-protocol.o \ -./proto/xdg-shell-protocol.o - -C_DEPS += \ -./proto/wlr-layer-shell-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 -DVERSION='"'"`hg identify`"'"' -I../inc -O3 -Wall -Wextra -c -fmessage-length=0 `pkg-config --cflags gtk+-3.0 gio-unix-2.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/Release/sources.mk b/Release/sources.mk deleted file mode 100644 index e145ff6..0000000 --- a/Release/sources.mk +++ /dev/null @@ -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 := \ -modes \ -proto \ -src \ - diff --git a/Release/src/subdir.mk b/Release/src/subdir.mk deleted file mode 100644 index 09713df..0000000 --- a/Release/src/subdir.mk +++ /dev/null @@ -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/config.c \ -../src/main.c \ -../src/map.c \ -../src/property_box.c \ -../src/utils.c \ -../src/wofi.c - -OBJS += \ -./src/config.o \ -./src/main.o \ -./src/map.o \ -./src/property_box.o \ -./src/utils.o \ -./src/wofi.o - -C_DEPS += \ -./src/config.d \ -./src/main.d \ -./src/map.d \ -./src/property_box.d \ -./src/utils.d \ -./src/wofi.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 -DVERSION='"'"`hg identify`"'"' -I../inc -O3 -Wall -Wextra -c -fmessage-length=0 `pkg-config --cflags gtk+-3.0 gio-unix-2.0` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..9527ba8 --- /dev/null +++ b/meson.build @@ -0,0 +1,27 @@ +project('wofi', 'c', version : 'v1.0', default_options : ['buildtype=release', 'warning_level=2']) +cc = meson.get_compiler('c') + +inc = include_directories('inc') +gtk = dependency('gtk+-3.0') +gio = dependency('gio-unix-2.0') +threads = dependency('threads') +wayland = dependency('wayland-client') +dl = cc.find_library('dl') + +add_project_arguments('-D_GNU_SOURCE', '-DVERSION="v1.0"', language : 'c') +add_project_link_arguments('-rdynamic', language : 'c') + +executable('wofi', +'src/config.c', +'src/main.c', +'src/map.c', +'src/property_box.c', +'src/utils.c', +'src/wofi.c', +'modes/dmenu.c', +'modes/drun.c', +'modes/run.c', +'proto/wlr-layer-shell-unstable-v1-protocol.c', +'proto/xdg-shell-protocol.c', +include_directories : inc, +dependencies : [gtk, gio, threads, wayland, dl])