pwman

Check-in [fcc5ac8547]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add (initial) Makefile and config.mk in suckless style

Based on the config.mk and Makefile from suckless's sic actually. The
config.h is as was produced from the autohell setup. I'm sure it can be
simplified and improved. The config.mk and Makefile probably aren't
far off.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | manualheaven
Files: files | file ages | folders
SHA3-256: fcc5ac8547ee9db38cfdd63989e976bf1140e808910cdf2a9f481fa6e2d74b6a
User & Date: base@atomicules.co.uk 2014-05-15 22:13:52
Context
2014-05-15
22:16
Needs reference to a definition of NULL now using new Makefile

I'm not sure how it got away with it before? check-in: 10c900ef1d user: base@atomicules.co.uk tags: manualheaven, trunk

22:13
Add (initial) Makefile and config.mk in suckless style

Based on the config.mk and Makefile from suckless's sic actually. The
config.h is as was produced from the autohell setup. I'm sure it can be
simplified and improved. The config.mk and Makefile probably aren't
far off. check-in: fcc5ac8547 user: base@atomicules.co.uk tags: manualheaven, trunk

21:47
Change gitignore now moving away from autohell check-in: 5e56b19a49 user: base@atomicules.co.uk tags: manualheaven, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added Makefile.









































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# PWman - An obsolete password manager for the console

include config.mk

SRC_PWMAN = actions.c filter.c gnupg.c gnupg.h help.h launch.c misc.c options.c pwgen.c pwlist.c pwman.c pwman.h search.c ui.c ui.h uilist.c
SRC_CONVERT_PWDB = convert_pwdb.c
SRC_PWDB2CSV = pwdb2csv.c
# This one isn't currently used: import_export.c
OBJ_PWMAN = ${SRC_PWMAN:.c=.o}
OBJ_CONVERT_PWDB = ${SRC_CONVERT_PWDB:.c=.o}
OBJ_PWDB2CSV = ${SRC_PWDB2CSV:.c=.o}

all: options pwman convert_pwdb pwdb2csv

options:
	@echo pwman build options:
	@echo "CFLAGS   = ${CFLAGS}"
	@echo "LDFLAGS  = ${LDFLAGS}"
	@echo "CC       = ${CC}"

.c.o:
	@echo CC $<
	@${CC} -c ${CFLAGS} $<

${OBJ_PWMAN}: config.h config.mk 
${OBJ_CONVERT_PWDB}: config.h config.mk 
${OBJ_PWDB2CSV}: config.h config.mk 

pwman: ${OBJ_PWMAN}
	@echo CC -o $@
	#Needs CFLAGS as well for libxml2
	@${CC} -o $@ ${OBJ_PWMAN} ${LDFLAGS} ${CFLAGS}

convert_pwdb: ${OBJ_CONVERT_PWDB}
	@echo CC -o $@
	@${CC} -o $@ ${OBJ_CONVERT_PWDB} ${LDFLAGS}

pwdb2csv: ${OBJ_PWDB2CSV}
	@echo CC -o $@
	@${CC} -o $@ ${OBJ_PWDB2CSV} ${LDFLAGS}

clean:
	@echo cleaning
	@rm -f pwman convert_pwdb pwdb2csv *.o

install: all
	@echo installing executable files to ${DESTDIR}${PREFIX}/bin
	@mkdir -p ${DESTDIR}${PREFIX}/bin
	@cp -f pwman ${DESTDIR}${PREFIX}/bin
	@chmod 755 ${DESTDIR}${PREFIX}/bin/pwman
	@cp -f convert_pwdb ${DESTDIR}${PREFIX}/bin
	@chmod 755 ${DESTDIR}${PREFIX}/bin/convert_pwdb
	@cp -f pwdb2csv ${DESTDIR}${PREFIX}/bin
	@chmod 755 ${DESTDIR}${PREFIX}/bin/pwdb2csv
	@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
	@sed "s/VERSION/${VERSION}/g" < pwman.1 > ${DESTDIR}${MANPREFIX}/man1/pwman.1
	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/pwman.1

uninstall:
	@echo removing executable files from ${DESTDIR}${PREFIX}/bin
	@rm -f ${DESTDIR}${PREFIX}/bin/pwman
	@rm -f ${DESTDIR}${PREFIX}/bin/convert_pwdb
	@rm -f ${DESTDIR}${PREFIX}/bin/pwdb2csv
	@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
	@rm -f ${DESTDIR}${MANPREFIX}/man1/pwman.1

.PHONY: all options clean install uninstall

Added config.h.



























































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* config.h.  Generated from config.h.in by configure.  */
/* config.h.in.  Generated from configure.ac by autoheader.  */

/* Define to 1 if you have the `drand48' function. */
#define HAVE_DRAND48 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the <linux/termios.h> header file. */
/* #undef HAVE_LINUX_TERMIOS_H */

/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the <ncurses.h> header file. */
/* #undef HAVE_NCURSES_H */

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Name of package */
#define PACKAGE "pwman"

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""

/* Define to the full name of this package. */
#define PACKAGE_NAME "pwman"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "pwman 0.4.4"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "pwman"

/* Define to the home page for this package. */
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "0.4.4"

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Version number of package */
#define VERSION "0.4.4"

/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */

Added config.mk.









































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# PWman version
VERSION = 0.4.4

# Customize below to fit your system

# paths
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man

# includes and libs
INCS = -I. -I/usr/include -I/usr/pkg/include `xml2-config --cflags` `libgcrypt-config --cflags`
LIBS = -L/usr/lib -lc -lcurses `xml2-config --libs` `libgcrypt-config --libs`

# flags
CPPFLAGS = -DVERSION=\"${VERSION}\" -D_GNU_SOURCE
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS = -s ${LIBS}

# compiler and linker
CC = cc