dwk, that's a good idea... For the bash file, it's a good bit simpler than the file-I/O solution I'd come up with, but the makefiles are the other end of the trade-off. I posted the working makefile above, so here's the new one, moved to the CLI subdirectory... (The GUI makefile is identical except the final 0 on the first line is a 1.)
Code:
# Makefile
CC = gcc `pkg-config gtk+-2.0 --cflags --libs` -D INTERFACE=0
CFLAGS = -ggdb -ansi -lm
OBJECTS = main.o interface.o outline.o ../../Jesdisciple/filesystem.o ../../Jesdisciple/list.o ../../Jesdisciple/toolkit.o
.PHONY: clean
clean:
rm *.o outliner
outliner: $(OBJECTS)
$(CC) -o $@ $^ $(CFLAGS)
main.o: ../main.c ../interface.h
interface.o: ../interface.c ../interface.h
../interface.h: ../outline.h
outline.o: ../outline.c ../outline.h
../outline.h: ../../Jesdisciple/filesystem.h
include ../../Jesdisciple/Makefile
Here are the resulting errors:
Code:
gcc `pkg-config gtk+-2.0 --cflags --libs` -D INTERFACE=0 -o outliner main.o interface.o outline.o ../../Jesdisciple/filesystem.o ../../Jesdisciple/list.o ../../Jesdisciple/toolkit.o -ggdb -ansi -lm
gcc: main.o: No such file or directory
gcc: interface.o: No such file or directory
gcc: outline.o: No such file or directory
make: *** [outliner] Error 1