diff options
author | Suleyman Farajli <suleyman@farajli.net> | 2024-08-05 21:57:44 +0400 |
---|---|---|
committer | Suleyman Farajli <suleyman@farajli.net> | 2024-08-05 21:57:44 +0400 |
commit | d59f97cc66de35dd9c8616136548d93cc1dd7f05 (patch) | |
tree | 4abb1443121764e20bb7f2e465048961d382543a | |
parent | ec65333610b477e49d66be4e8c21fcc1139c70d2 (diff) |
directory layout changed and Makefile updated
-rw-r--r-- | LICENSE | 30 | ||||
-rw-r--r-- | Makefile | 70 | ||||
-rw-r--r-- | README | 24 | ||||
-rw-r--r-- | config.mk | 32 | ||||
-rw-r--r-- | doc/dmenu.1 (renamed from dmenu.1) | 0 | ||||
-rw-r--r-- | doc/stest.1 (renamed from stest.1) | 0 | ||||
-rw-r--r-- | src/arg.h (renamed from arg.h) | 0 | ||||
-rw-r--r-- | src/config.h (renamed from config.h) | 0 | ||||
-rw-r--r-- | src/dmenu.c (renamed from dmenu.c) | 0 | ||||
-rwxr-xr-x | src/dmenu_path (renamed from dmenu_path) | 0 | ||||
-rwxr-xr-x | src/dmenu_run (renamed from dmenu_run) | 0 | ||||
-rw-r--r-- | src/drw.c (renamed from drw.c) | 0 | ||||
-rw-r--r-- | src/drw.h (renamed from drw.h) | 0 | ||||
-rw-r--r-- | src/stest.c (renamed from stest.c) | 0 | ||||
-rw-r--r-- | src/util.c (renamed from util.c) | 0 | ||||
-rw-r--r-- | src/util.h (renamed from util.h) | 0 |
16 files changed, 44 insertions, 112 deletions
diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 2a64b28..0000000 --- a/LICENSE +++ /dev/null @@ -1,30 +0,0 @@ -MIT/X Consortium License - -© 2006-2019 Anselm R Garbe <anselm@garbe.ca> -© 2006-2008 Sander van Dijk <a.h.vandijk@gmail.com> -© 2006-2007 Michał Janeczek <janeczek@gmail.com> -© 2007 Kris Maglione <jg@suckless.org> -© 2009 Gottox <gottox@s01.de> -© 2009 Markus Schnalke <meillo@marmaro.de> -© 2009 Evan Gates <evan.gates@gmail.com> -© 2010-2012 Connor Lane Smith <cls@lubutu.com> -© 2014-2022 Hiltjo Posthuma <hiltjo@codemadness.org> -© 2015-2019 Quentin Rameau <quinq@fifth.space> - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. @@ -1,49 +1,63 @@ -# dmenu - dynamic menu -# See LICENSE file for copyright and license details. +# dmenu version +VERSION = 5.3 -include config.mk +# paths +PREFIX = /usr/local +MANPREFIX = $(PREFIX)/share/man -SRC = drw.c dmenu.c stest.c util.c -OBJ = $(SRC:.c=.o) +X11INC = /usr/X11R6/include +X11LIB = /usr/X11R6/lib -all: dmenu stest +# Xinerama, comment if you don't want it +XINERAMALIBS = -lXinerama +XINERAMAFLAGS = -DXINERAMA + +# freetype +FREETYPELIBS = -lfontconfig -lXft +FREETYPEINC = /usr/include/freetype2 +# OpenBSD (uncomment) +#FREETYPEINC = $(X11INC)/freetype2 +#MANPREFIX = ${PREFIX}/man + +# includes and libs +INCS = -I$(X11INC) -I$(FREETYPEINC) +LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS) + +# flags +CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS) +CFLAGS = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS) +LDFLAGS = $(LIBS) -.c.o: - $(CC) -c $(CFLAGS) $< +# compiler and linker +CC = cc -config.h: - cp config.def.h $@ +SRC = src/dmenu.c src/drw.c src/stest.c src/util.c +OBJ = $(patsubst src/%.c, %.o, $(SRC)) -$(OBJ): arg.h config.h config.mk drw.h +all: dmenu stest + +%.o: src/%.c + ${CC} -c ${CFLAGS} $< dmenu: dmenu.o drw.o util.o - $(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS) + $(CC) -o $@ $^ $(LDFLAGS) stest: stest.o - $(CC) -o $@ stest.o $(LDFLAGS) + $(CC) -o $@ $^ $(LDFLAGS) clean: - rm -f dmenu stest $(OBJ) dmenu-$(VERSION).tar.gz - -dist: clean - mkdir -p dmenu-$(VERSION) - cp LICENSE Makefile README arg.h config.def.h config.mk dmenu.1\ - drw.h util.h dmenu_path dmenu_run stest.1 $(SRC)\ - dmenu-$(VERSION) - tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION) - gzip dmenu-$(VERSION).tar - rm -rf dmenu-$(VERSION) + rm -f dmenu stest $(OBJ) install: all mkdir -p $(DESTDIR)$(PREFIX)/bin - cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin + cp -f dmenu src/dmenu_path src/dmenu_run stest $(DESTDIR)$(PREFIX)/bin chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run chmod 755 $(DESTDIR)$(PREFIX)/bin/stest mkdir -p $(DESTDIR)$(MANPREFIX)/man1 - sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1 - sed "s/VERSION/$(VERSION)/g" < stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1 + sed "s/VERSION/$(VERSION)/g" < doc/dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1 + sed "s/VERSION/$(VERSION)/g" < doc/stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dmenu.1 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/stest.1 @@ -56,3 +70,7 @@ uninstall: $(DESTDIR)$(MANPREFIX)/man1/stest.1 .PHONY: all clean dist install uninstall + +dmenu.o: src/drw.h src/util.h src/config.h +drw.o: src/drw.h src/util.h +util.o: src/util.h @@ -1,24 +0,0 @@ -dmenu - dynamic menu -==================== -dmenu is an efficient dynamic menu for X. - - -Requirements ------------- -In order to build dmenu you need the Xlib header files. - - -Installation ------------- -Edit config.mk to match your local setup (dmenu is installed into -the /usr/local namespace by default). - -Afterwards enter the following command to build and install dmenu -(if necessary as root): - - make clean install - - -Running dmenu -------------- -See the man page for details. diff --git a/config.mk b/config.mk deleted file mode 100644 index 137f7c8..0000000 --- a/config.mk +++ /dev/null @@ -1,32 +0,0 @@ -# dmenu version -VERSION = 5.3 - -# paths -PREFIX = /usr/local -MANPREFIX = $(PREFIX)/share/man - -X11INC = /usr/X11R6/include -X11LIB = /usr/X11R6/lib - -# Xinerama, comment if you don't want it -XINERAMALIBS = -lXinerama -XINERAMAFLAGS = -DXINERAMA - -# freetype -FREETYPELIBS = -lfontconfig -lXft -FREETYPEINC = /usr/include/freetype2 -# OpenBSD (uncomment) -#FREETYPEINC = $(X11INC)/freetype2 -#MANPREFIX = ${PREFIX}/man - -# includes and libs -INCS = -I$(X11INC) -I$(FREETYPEINC) -LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS) - -# flags -CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS) -CFLAGS = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS) -LDFLAGS = $(LIBS) - -# compiler and linker -CC = cc diff --git a/dmenu_path b/src/dmenu_path index 3a7cda7..3a7cda7 100755 --- a/dmenu_path +++ b/src/dmenu_path diff --git a/dmenu_run b/src/dmenu_run index 834ede5..834ede5 100755 --- a/dmenu_run +++ b/src/dmenu_run |