CC = gcc
LINK = gcc
CCOPTIONS = -c -D_GNU_SOURCE -Wall
LINKOPTIONS =
LIBS = 
EXE = mkttfontdir


SRCDIR = source
OBJDIR = obj

OBJS = $(OBJDIR)/main.o



all: $(EXE)
	@echo
	@echo Done. See README for instructions on how to use this and 
	@echo what it does \(or what it should do \;\).
	@echo
	@echo Quick start :
	@echo Copy $(EXE) to a directory somewhere in your PATH,
	@echo copy your truetype font files to a directory \(for example
	@echo /usr/X11R6/lib/X11/fonts/TrueType/ \), enter that directory
	@echo and type \'mkttfontdir *.ttf *.TTF\'. Now add this path to your
	@echo /etc/X11/XF86Config in the FILES section \(for example 
	@echo \'FontPath \"/usr/X11R6/lib/X11/fonts/TrueType/\" \' \) and 
	@echo restart your X server. Enjoy your new fonts.
	@echo

$(EXE): $(OBJDIR) $(OBJS)
	$(CC) $(LINKOPTIONS) $(OBJS) -o $(EXE) $(LIBS)
#-l$(LIBS)

static: $(OBJDIR) $(OBJS)
	$(CC) $(LINKOPTIONS) -static $(OBJS) -o $(EXE) $(LIBS)


clean:
	rm -r $(OBJDIR)


build: clean $(EXE)

#------------------------------------------------------

$(OBJDIR)/main.o: $(SRCDIR)/main.c $(SRCDIR)/config.h $(SRCDIR)/ttypes.h $(SRCDIR)/ttheader.h $(SRCDIR)/ttdir.h
	$(CC) $(CCOPTIONS) -o $(OBJDIR)/main.o $(SRCDIR)/main.c

$(OBJDIR):
	mkdir obj
