# # glst by Davide Libenzi ( SMTP GreyListing module ) # Copyright (C) 2004 Davide Libenzi # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Davide Libenzi # # OUTDIR = bin GLST_TARGET = $(OUTDIR)/glst DBDUMP_TARGET = $(OUTDIR)/dbdump DBLOAD_TARGET = $(OUTDIR)/dbload SRCDIR = . INCLUDE = -I. CC = gcc LD = gcc MKDEP = mkdep -f .depend CFLAGS = $(INCLUDE) -DUNIX -DLINUX LDFLAGS = LIBS = -lgdbm GLST_SOURCES = $(SRCDIR)/glst.c GLST_OBJECTS = $(OUTDIR)/glst.o DBDUMP_SOURCES = $(SRCDIR)/dbdump.c DBDUMP_OBJECTS = $(OUTDIR)/dbdump.o DBLOAD_SOURCES = $(SRCDIR)/dbload.c DBLOAD_OBJECTS = $(OUTDIR)/dbload.o ALL_TARGETS = $(GLST_TARGET) $(DBDUMP_TARGET) $(DBLOAD_TARGET) ALL_OBJECTS = $(GLST_OBJECTS) $(DBDUMP_OBJECTS) $(DBLOAD_OBJECTS) ALL_SOURCES = $(GLST_SOURCES) $(DBDUMP_SOURCES) $(DBLOAD_SOURCES) $(OUTDIR)/%.o: $(SRCDIR)/%.c $(CC) $(CFLAGS) -o $(OUTDIR)/$*.o -c $(SRCDIR)/$*.c all: $(OUTDIR) .depend $(ALL_TARGETS) .depend: $(ALL_SOURCES) $(MKDEP) $(CFLAGS) $(ALL_SOURCES) $(GLST_TARGET): $(GLST_OBJECTS) $(LD) $(LDFLAGS) -o $(GLST_TARGET) $(GLST_OBJECTS) $(LIBS) $(DBDUMP_TARGET): $(DBDUMP_OBJECTS) $(LD) $(LDFLAGS) -o $(DBDUMP_TARGET) $(DBDUMP_OBJECTS) $(LIBS) $(DBLOAD_TARGET): $(DBLOAD_OBJECTS) $(LD) $(LDFLAGS) -o $(DBLOAD_TARGET) $(DBLOAD_OBJECTS) $(LIBS) $(OUTDIR): @mkdir $(OUTDIR) distclean: clean @rm -f .depend @rm -rf $(OUTDIR) clean: @rm -f $(ALL_TARGETS) @rm -f $(ALL_OBJECTS) @rm -f *~ include .depend