Program to generate an xml file based on a provided text file
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

oldmakefile 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Este makefile es el antiguo y mas limitado, no puede detectar el entorno para verificar que la compilación va a funcionar
  2. CC=gcc
  3. BINDIR=out
  4. SRCDIR=.
  5. EXTRADIR=../misc
  6. DEBUG_FLAGS=-Wall -Werror
  7. CFLAGS=$(DEBUG_FLAGS) -ggdb -Wconversion -std=c11 -D_DEFAULT_SOURCE $(shell pkg-config libxml-2.0 --cflags) -ansi
  8. LDFLAGS=$(shell pkg-config libxml-2.0 --libs)
  9. #CPPFLAGS
  10. # DEBUG: show debug information during runtime
  11. # DEBUG_ENCODING: show debug information related to encoding at runtime
  12. CPPFLAGS=-DDEBUG
  13. BINARY=generarxml
  14. OBJS = \
  15. $(SRCDIR)/main.o \
  16. $(SRCDIR)/readconfig.o \
  17. $(SRCDIR)/readfile.o \
  18. $(SRCDIR)/encoding.o
  19. all: bin
  20. bin: $(OBJS)
  21. [ -d "out" ] && echo ¨out already exists¨ || mkdir -v out
  22. $(CC)$(xml2-config --cflags --libs) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $(BINDIR)/$(BINARY)
  23. cp $(EXTRADIR)/*.conf $(BINDIR)/
  24. cp $(EXTRADIR)/*.dtd $(BINDIR)/
  25. cp $(EXTRADIR)/*.txt $(BINDIR)/
  26. clean:
  27. rm -fR $(BINDIR) $(SRCDIR)/*.o
  28. %.o: %.c
  29. $(CC)$(xml2-config --cflags --libs) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c $< -o $@