Makefile 1.5 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. # this is broken
  16. # the makefile is completely out of date
  17. RM = rm -f
  18. CC = gcc
  19. LD = ld
  20. GUILIB_DIR = ../../gui-lib
  21. WIKILIB_DIR = ../../wiki-lib
  22. FATFS_DIR = ../../samo-lib/fatfs
  23. CFLAGS = -g -O3 -Wall -MD -D_REENTRANT -Werror
  24. CFLAGS += -I $(WIKILIB_DIR)/include
  25. CFLAGS += -I $(GUILIB_DIR)
  26. CFLAGS += -I $(FATFS_DIR)/src
  27. CFLAGS += -I $(FATFS_DIR)/config/c33/read-write
  28. LDFLAGS = -g -dynamic -lncurses
  29. C_OBJS = guilib.o glyph.o file-io-posix.o wikilib.o time-posix.o
  30. C_OBJS += fontfile.o search.o article.o history.o
  31. C_OBJS += keyboard.o
  32. vpath %.c $(WIKILIB_DIR)/generic $(WIKILIB_DIR)/specific $(GUILIB_DIR) \
  33. $(COMMON_DIR)
  34. TARGETS = wikireader
  35. OBJS = $(C_OBJS) main.o
  36. all: $(TARGETS)
  37. wikireader: $(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