summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2024-08-05 21:57:44 +0400
committerSuleyman Farajli <suleyman@farajli.net>2024-08-05 21:57:44 +0400
commitd59f97cc66de35dd9c8616136548d93cc1dd7f05 (patch)
tree4abb1443121764e20bb7f2e465048961d382543a
parentec65333610b477e49d66be4e8c21fcc1139c70d2 (diff)
directory layout changed and Makefile updated
-rw-r--r--LICENSE30
-rw-r--r--Makefile70
-rw-r--r--README24
-rw-r--r--config.mk32
-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-xsrc/dmenu_path (renamed from dmenu_path)0
-rwxr-xr-xsrc/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.
diff --git a/Makefile b/Makefile
index 458c524..818887c 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/README b/README
deleted file mode 100644
index a8fcdfe..0000000
--- a/README
+++ /dev/null
@@ -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.1 b/doc/dmenu.1
index 323f93c..323f93c 100644
--- a/dmenu.1
+++ b/doc/dmenu.1
diff --git a/stest.1 b/doc/stest.1
index 2667d8a..2667d8a 100644
--- a/stest.1
+++ b/doc/stest.1
diff --git a/arg.h b/src/arg.h
index e94e02b..e94e02b 100644
--- a/arg.h
+++ b/src/arg.h
diff --git a/config.h b/src/config.h
index b30dcef..b30dcef 100644
--- a/config.h
+++ b/src/config.h
diff --git a/dmenu.c b/src/dmenu.c
index fa070d8..fa070d8 100644
--- a/dmenu.c
+++ b/src/dmenu.c
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
diff --git a/drw.c b/src/drw.c
index 78a2b27..78a2b27 100644
--- a/drw.c
+++ b/src/drw.c
diff --git a/drw.h b/src/drw.h
index fd7631b..fd7631b 100644
--- a/drw.h
+++ b/src/drw.h
diff --git a/stest.c b/src/stest.c
index e27d3a5..e27d3a5 100644
--- a/stest.c
+++ b/src/stest.c
diff --git a/util.c b/src/util.c
index 96b82c9..96b82c9 100644
--- a/util.c
+++ b/src/util.c
diff --git a/util.h b/src/util.h
index c0a50d4..c0a50d4 100644
--- a/util.h
+++ b/src/util.h