exposurses

Check-in [86fd753f70]
Login

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

Overview
Comment:Add debug options to Makefile

Not as simple as adding `-g` option as also need to ensure not calling
the `-s` option which strips the debug info.

Decided to change so have a `make` and a `make debug`

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 86fd753f7080871fe01062142d24bc55b962f736a8d2b467f5db93aeae5d2039
User & Date: base@atomicules.co.uk 2013-09-18 10:44:44
Context
2013-09-18
11:01
Try separate win and menu functions

instead of trying to wrap everything in one. This way I know I can
return the correct thing and I know I'm setting things as expected.

As opposed to previous attempt where I was (trying) to use variable
pointers, but with pointers to pointers, etc. And was obviously a bit
beyond me. check-in: e4268c4b4e user: base@atomicules.co.uk tags: origin/master, trunk

10:44
Add debug options to Makefile

Not as simple as adding `-g` option as also need to ensure not calling
the `-s` option which strips the debug info.

Decided to change so have a `make` and a `make debug` check-in: 86fd753f70 user: base@atomicules.co.uk tags: origin/master, trunk

10:33
For ref: Try wrapping menu and window creation in single function

Got this so it drew everything ok, but segfaults as soon as a key is
pressed. I obviously don't understand pointers, etc properly yet. As
although it's drawn the menus it hasn't "attached" them the the
objects/pointers I was expecting. check-in: a88f7285c1 user: base@atomicules.co.uk tags: origin/master, trunk

Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to 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
1
2
3
4
5
6
7
8
9
10
11
12
13



14
15
16
17



18
19
20
21
22
23
24













-
-
-
+
+
+

-
-
-
+
+
+




# exposurses

include config.mk

SRC = exposurses.c
OBJ = ${SRC:.c=.o}

all: options exposurses

options:
	@echo build options:
	@echo "CC       = ${CC}"

.c.o:
	@echo CC $<
	@${CC} -c $<
exposurses: ${OBJ}
	@echo CC -o $@
	@${CC} -s ${LIBS} ${SRC} -o $@ 

exposurses: ${OBJ}
	@echo CC -o $@
	@${CC} -o $@ ${OBJ} ${LDFLAGS}
debug: 
	@echo "Building with debug symbols"	
	@${CC} -g ${LIBS} ${SRC} -o exposurses

clean:
	@echo cleaning
	@rm -f exposurses ${OBJ}

Changes to config.mk.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1
2
3
4
5
6
7

8
9



10
11







-


-
-
-


# Customize below to fit your system

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

# includes and libs
#INCS = -I. -I/usr/include
LIBS=-lmenu -lcurses -lm

# flags
LDFLAGS = -s ${LIBS}

# compiler and linker
CC = cc