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.

     7      7   
     8      8   all: options exposurses
     9      9   
    10     10   options:
    11     11   	@echo build options:
    12     12   	@echo "CC       = ${CC}"
    13     13   
    14         -.c.o:
    15         -	@echo CC $<
    16         -	@${CC} -c $<
    17         -
    18     14   exposurses: ${OBJ}
    19     15   	@echo CC -o $@
    20         -	@${CC} -o $@ ${OBJ} ${LDFLAGS}
           16  +	@${CC} -s ${LIBS} ${SRC} -o $@ 
           17  +
           18  +debug: 
           19  +	@echo "Building with debug symbols"	
           20  +	@${CC} -g ${LIBS} ${SRC} -o exposurses
    21     21   
    22     22   clean:
    23     23   	@echo cleaning
    24     24   	@rm -f exposurses ${OBJ}

Changes to config.mk.

     1      1   # Customize below to fit your system
     2      2   
     3      3   # paths
     4      4   PREFIX = /usr/local
     5      5   MANPREFIX = ${PREFIX}/share/man
     6      6   
     7      7   # includes and libs
     8         -#INCS = -I. -I/usr/include
     9      8   LIBS=-lmenu -lcurses -lm
    10      9   
    11         -# flags
    12         -LDFLAGS = -s ${LIBS}
    13         -
    14     10   # compiler and linker
    15     11   CC = cc