author | root@rika |
Wed, 06 Feb 2008 17:32:55 +0000 | |
changeset 4 | df6a40031aa5 |
permissions | -rw-r--r-- |
root@4 | 1 |
# |
root@4 | 2 |
# Makefile for the GraphLCD tool crtfont |
root@4 | 3 |
# |
root@4 | 4 |
|
root@4 | 5 |
-include ../../Make.config |
root@4 | 6 |
|
root@4 | 7 |
PRGNAME = genfont |
root@4 | 8 |
|
root@4 | 9 |
OBJS = genfont.o |
root@4 | 10 |
|
root@4 | 11 |
INCLUDES += -I../../ |
root@4 | 12 |
INCLUDES += `freetype-config --cflags` |
root@4 | 13 |
|
root@4 | 14 |
LIBDIRS += -L../../glcdgraphics/ |
root@4 | 15 |
LIBS += `freetype-config --libs` |
root@4 | 16 |
|
root@4 | 17 |
all: $(PRGNAME) |
root@4 | 18 |
.PHONY: all |
root@4 | 19 |
|
root@4 | 20 |
# Implicit rules: |
root@4 | 21 |
|
root@4 | 22 |
%.o: %.c |
root@4 | 23 |
$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< |
root@4 | 24 |
|
root@4 | 25 |
# Dependencies: |
root@4 | 26 |
|
root@4 | 27 |
MAKEDEP = $(CXX) -MM -MG |
root@4 | 28 |
DEPFILE = .dependencies |
root@4 | 29 |
$(DEPFILE): Makefile |
root@4 | 30 |
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ |
root@4 | 31 |
|
root@4 | 32 |
-include $(DEPFILE) |
root@4 | 33 |
|
root@4 | 34 |
# The main program: |
root@4 | 35 |
|
root@4 | 36 |
$(PRGNAME): $(OBJS) |
root@4 | 37 |
$(CXX) $(CXXFLAGS) -rdynamic $(OBJS) $(LIBDIRS) $(LIBS) -lglcdgraphics -lstdc++ -o $(PRGNAME) |
root@4 | 38 |
|
root@4 | 39 |
install: $(PRGNAME) |
root@4 | 40 |
install -d $(BINDIR) |
root@4 | 41 |
install -m 755 -o root -g root -s $(PRGNAME) $(BINDIR) |
root@4 | 42 |
|
root@4 | 43 |
uninstall: |
root@4 | 44 |
rm -f $(BINDIR)/$(PRGNAME) |
root@4 | 45 |
|
root@4 | 46 |
clean: |
root@4 | 47 |
@-rm -f $(OBJS) $(DEPFILE) $(PRGNAME) *~ |
root@4 | 48 |