Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright (c) 2009 Openmoko Inc.
  2. #
  3. # This program is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 3 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. RM = rm -f
  16. CC = gcc
  17. LD = ld
  18. WIKIAPP_DIR = ../../wiki-app
  19. LZMA_DIR = ../../samo-lib/lzma
  20. CFLAGS = -g -O3 -Wall -MD -D_REENTRANT -DWIKIPCF -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DBZ_NO_STDIO -DWIKIPCF
  21. CFLAGS += -I. -I$(WIKIAPP_DIR) -I$(LZMA_DIR)
  22. LDFLAGS = -g -dynamic -L/usr/lib/mysql -lmysqlclient
  23. C_OBJS = wiki_render.o
  24. C_OBJS += lcd_buf_draw.o
  25. C_OBJS += bmf.o
  26. C_OBJS += bigram.o
  27. C_OBJS += LzmaEnc.o
  28. C_OBJS += LzmaDec.o
  29. C_OBJS += Alloc.o
  30. C_OBJS += Bra.o
  31. C_OBJS += LzFind.o
  32. C_OBJS += search_hash.o
  33. vpath %.c $(WIKIAPP_DIR) $(LZMA_DIR)
  34. TARGETS = wiki-xml-parser
  35. OBJS = $(C_OBJS) main.o
  36. all: $(TARGETS)
  37. wiki-xml-parser: $(OBJS)
  38. $(CC) $(LDFLAGS) $(OBJS) -o $@
  39. .c.o:
  40. $(CC) $(CFLAGS) -c $< -o $@
  41. clean:
  42. $(RM) $(TARGETS) *.o *.d
  43. -include $(wildcard *.d) dummy