#CFLAGS += -Wall -g3 -funsigned-char -I. CFLAGS += -Wall -Werror -g3 -O1 -funsigned-char -I. #LDFLAGS += $(shell pkg-config --libs glib-2.0) LDFLAGS += $(shell pkg-config --libs bdw-gc) LDFLAGS += -lm ENCODINGS = encodings/PC/CP437.o \ encodings/PC/CP737.o \ encodings/PC/CP775.o \ encodings/PC/CP850.o \ encodings/PC/CP852.o \ encodings/PC/CP855.o \ encodings/PC/CP857.o \ encodings/PC/CP860.o \ encodings/PC/CP861.o \ encodings/PC/CP862.o \ encodings/PC/CP863.o \ encodings/PC/CP864.o \ encodings/PC/CP865.o \ encodings/PC/CP866.o \ encodings/PC/CP869.o \ encodings/PC/CP874.o \ encodings/PC/CP1250.o \ encodings/PC/CP1251.o \ encodings/PC/CP1252.o \ encodings/PC/CP1253.o \ encodings/PC/CP1254.o \ encodings/PC/CP1255.o \ encodings/PC/CP1256.o \ encodings/PC/CP1257.o \ encodings/PC/CP1258.o \ encodings/Mac/ROMAN.o COMMON_OBJECTS = Formatter.o View.o Buffer.o Log.o Symbol.o Controller.o Event.o Mark.o BufferIterator.o Reactor.o DFState.o Terminfo.o encoders.o Styles.o Storage/RTF.o Linkmark.o Stylemark.o JSF.o Structurer.o Mode.o Modedetector.o ghashtable.o Storage/Directory.o Digits.o Symbols.o NFState.o bsearchx.o Sortedarray.o $(ENCODINGS) GTK_CFLAGS = $(CFLAGS) GTK_LDFLAGS = $(LDFLAGS) GTK_CFLAGS += $(shell pkg-config --cflags gtk+-2.0) -I. -I.. GTK_LDFLAGS += $(shell pkg-config --libs gtk+-2.0) CED_OBJECTS = $(COMMON_OBJECTS) ConsoleTextdev.o cedmain.o GED_OBJECTS = $(COMMON_OBJECTS) GtkTextdev.o gedmain.o .SUFFIXES: # Delete the default suffixes %.o: %.c %.o: %.c $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< all: ced ged ced: $(CED_OBJECTS) $(CC) -o ced $(CED_OBJECTS) $(LDFLAGS) ged: $(GED_OBJECTS) $(CC) -o ged $(GED_OBJECTS) $(GTK_LDFLAGS) cedmain.o: cedmain.c Buffer.h Symbol.h View.h Controller.h ConsoleTextdev.h Reactor.h gedmain.o: gedmain.c Buffer.h Symbol.h View.h Controller.h GtkTextdev.h Reactor.h $(CC) -o $@ -c $< $(GTK_CFLAGS) Formatter.o: Formatter.c Formatter.h Textdev.h Reactor.h DFState.h Symbol.h Mark.h Symbols.h Allocator.h View.o: View.c View.h Allocator.h Formatter.h Buffer.h Textdev.h Buffer.o: Buffer.c Buffer.h Allocator.h Mark.h Symbols.h BufferIterator.h Symbol.h bsearchx.h BufferIterator.o: BufferIterator.c BufferIterator.h Allocator.h Log.o: Log.c Log.h Allocator.h Event.h Symbol.o: Symbol.c Symbol.h Allocator.h ghashtable.h #Allocator.o: Allocator.c Allocator.h Controller.o: Controller.c Controller.h Allocator.h View.h Buffer.h BufferIterator.h Log.h Symbol.h Textdev.h Reactor.h Event.h DFState.h Mode.h Modedetector.h Event.o: Event.c Event.h Symbol.h Allocator.h Mark.o: Mark.c Mark.h Symbols.h Allocator.h Buffer.h Reactor.o: Reactor.c Reactor.h Allocator.h DFState.o: DFState.c DFState.h Allocator.h Digits.h Symbol.h bsearchx.o: bsearchx.c bsearchx.h NFState.o: NFState.c NFState.h bsearchx.h Sortedarray.h ConsoleTextdev.o: ConsoleTextdev.c ConsoleTextdev.h Textdev.h Allocator.h Reactor.h DFState.h Event.h Symbol.h Terminfo.h Terminfo.h Textdev.inc.c Terminfo.o: Terminfo.c Terminfo.h Allocator.h test-Textdev: test-Textdev.o Textdev.o DFState.o Symbol.o Terminfo.o encoders.o Event.o Reactor.o $(CC) -o $@ test-Textdev.o Textdev.o DFState.o Symbol.o Terminfo.o encoders.o Event.o Reactor.o $(LDFLAGS) test-Formatter: test-Formatter.o Formatter.o Textdev.o DFState.o Symbol.o Terminfo.o encoders.o Event.o Reactor.o $(CC) -o $@ test-Formatter.o Formatter.o Textdev.o DFState.o Symbol.o Terminfo.o encoders.o Event.o Reactor.o $(LDFLAGS) test-Textdev.o: test-Textdev.c Textdev.h test-Formatter.o: test-Formatter.c Formatter.h Textdev.h Styles.o: Styles.c Styles.h Symbol.h Allocator.h Stylemark.o: Stylemark.c Stylemark.h Mark.h Symbols.h Allocator.h Symbol.h Linkmark.o: Linkmark.c Linkmark.h Mark.h Symbols.h Allocator.h Symbol.h Storage/RTF.o: Storage/RTF.c Storage/RTF.h Symbol.h Buffer.h Styles.h Stylemark.h Linkmark.h Allocator.h encodings/PC.h encodings/Mac.h Structurer.o: Structurer.c Structurer.h Symbol.h Buffer.h Styles.h Stylemark.h Linkmark.h DFState.h Mode.h Storage/Directory.o: Storage/Directory.c Storage/Directory.h Symbol.h Buffer.h Styles.h Stylemark.h Linkmark.h DFState.h Mode.h JSF.o: JSF.c JSF.h DFState.h Symbol.h NFState.h Mode.o: Mode.c Mode.h DFState.h Symbol.h Allocator.h View.h Buffer.h Modedetector.o: Modedetector.c Mode.h DFState.h Symbol.h Allocator.h View.h Buffer.h ghashtable.h Storage/Directory.h ghashtable.o: ghashtable.c ghashtable.h Sortedarray.o: Sortedarray.c Sortedarray.h bsearchx.h Allocator.h encoders.o: encoders.c encoders.h $(CC) -o $@ -c $< GtkTextdev.o: GtkTextdev.c GtkTextdev.h Textdev.h Reactor.h Textdev.inc.c $(CC) -o $@ -c $< $(GTK_CFLAGS) Symbols.o: Symbols.c Symbols.h Symbol.h test-Sortedarray.o: test-Sortedarray.c Sortedarray.h test-Sortedarray: test-Sortedarray.o Sortedarray.o bsearchx.o $(CC) -g3 -o $@ $^ -lgc encodings/PC/CP437.o: encodings/PC/CP437.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP737.o: encodings/PC/CP737.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP775.o: encodings/PC/CP775.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP850.o: encodings/PC/CP850.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP852.o: encodings/PC/CP852.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP855.o: encodings/PC/CP855.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP857.o: encodings/PC/CP857.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP860.o: encodings/PC/CP860.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP861.o: encodings/PC/CP861.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP862.o: encodings/PC/CP862.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP863.o: encodings/PC/CP863.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP864.o: encodings/PC/CP864.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP865.o: encodings/PC/CP865.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP866.o: encodings/PC/CP866.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP869.o: encodings/PC/CP869.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP874.o: encodings/PC/CP874.c encodings/generateEncodingTable -o $@ $< encodings/PC/CP437.c: encodings/PC/CP437.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP737.c: encodings/PC/CP737.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP775.c: encodings/PC/CP775.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP850.c: encodings/PC/CP850.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP852.c: encodings/PC/CP852.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP855.c: encodings/PC/CP855.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP857.c: encodings/PC/CP857.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP860.c: encodings/PC/CP860.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP861.c: encodings/PC/CP861.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP862.c: encodings/PC/CP862.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP863.c: encodings/PC/CP863.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP864.c: encodings/PC/CP864.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP865.c: encodings/PC/CP865.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP866.c: encodings/PC/CP866.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP869.c: encodings/PC/CP869.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP874.c: encodings/PC/CP874.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP1250.c: encodings/PC/CP1250.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP1251.c: encodings/PC/CP1251.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP1252.c: encodings/PC/CP1252.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP1253.c: encodings/PC/CP1253.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP1254.c: encodings/PC/CP1254.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP1255.c: encodings/PC/CP1255.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP1256.c: encodings/PC/CP1256.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP1257.c: encodings/PC/CP1257.TXT encodings/generateEncodingTable -o $@ $< encodings/PC/CP1258.c: encodings/PC/CP1258.TXT encodings/generateEncodingTable -o $@ $< encodings/Mac/ROMAN.c: encodings/Mac/ROMAN.TXT encodings/generateEncodingTable -o $@ $< test: test-Sortedarray ./test-Sortedarray clean: rm -f -- *.o distclean: clean