Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 += Alloc.o
  29. C_OBJS += Bra.o
  30. C_OBJS += LzFind.o
  31. C_OBJS += search_hash.o
  32. vpath %.c $(WIKIAPP_DIR) $(LZMA_DIR)
  33. TARGETS = wiki-xml-parser
  34. OBJS = $(C_OBJS) main.o
  35. all: $(TARGETS)
  36. wiki-xml-parser: $(OBJS)
  37. $(CC) $(LDFLAGS) $(OBJS) -o $@
  38. .c.o:
  39. $(CC) $(CFLAGS) -c $< -o $@
  40. clean:
  41. $(RM) $(TARGETS) *.o *.d
  42. -include $(wildcard *.d) dummy