generarxml/Makefile

37 lines
768 B
Makefile
Raw Normal View History

2016-10-13 15:08:01 -03:00
CC=gcc
BINDIR=out
2016-10-13 19:55:33 -03:00
DEBUG_FLAGS=-Wall -Werror
2016-10-13 15:08:01 -03:00
2016-10-16 14:16:03 -03:00
CFLAGS=$(DEBUG_FLAGS) -ggdb -Wconversion -std=c11 -D_DEFAULT_SOURCE $(shell pkg-config libxml-2.0 --cflags) -ansi
2016-10-13 15:08:01 -03:00
LDFLAGS=$(shell pkg-config libxml-2.0 --libs)
2016-10-16 14:16:03 -03:00
#CPPFLAGS
# DEBUG: show debug information during runtime
# DEBUG_ENCODING: show debug information related to encoding at runtime
CPPFLAGS=-DDEBUG
2016-10-13 15:08:01 -03:00
BINARY=generarxml
OBJS = \
main.o \
2016-10-16 14:16:03 -03:00
readconfig.o \
readfile.o \
encoding.o \
string.o
2016-10-13 15:08:01 -03:00
all: bin
bin: $(OBJS)
2016-10-16 14:16:03 -03:00
$(CC)$(xml2-config --cflags --libs) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $(BINDIR)/$(BINARY)
cp *.conf $(BINDIR)/
cp *.dtd $(BINDIR)/
cp Biblia.txt $(BINDIR)/
2016-10-13 15:08:01 -03:00
clean:
2016-10-16 14:16:03 -03:00
rm -fR $(BINDIR)/* *.o
2016-10-13 15:08:01 -03:00
%.o: %.c
2016-10-16 14:16:03 -03:00
$(CC)$(xml2-config --cflags --libs) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c $< -o $@