generarxml/Makefile

26 lines
471 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-13 19:55:33 -03:00
CFLAGS=$(DEBUG_FLAGS) -ggdb $(shell pkg-config libxml-2.0 --cflags) -ansi -I ./headers
2016-10-13 15:08:01 -03:00
LDFLAGS=$(shell pkg-config libxml-2.0 --libs)
BINARY=generarxml
OBJS = \
main.o \
readconfig.o
all: bin
bin: $(OBJS)
$(CC) $(xml2-config --cflags --libs) $(CFLAGS) $(OBJS) $(LDFLAGS) \
-o $(BINDIR)/$(BINARY)
clean:
rm -fR $(BINDIR)/$(BINARY) *.o
%.o: %.c
$(CC) $(xml2-config --cflags --libs) $(CFLAGS) -c $< -o $@ $(LDFLAGS)