39 lines
610 B
Makefile
39 lines
610 B
Makefile
srcdir = @srcdir@
|
|
VPATH = $(srcdir)
|
|
|
|
include $(srcdir)/../Makefile.inc
|
|
|
|
LIBOBJECTS = @MISCOBJS@ popt.o
|
|
LIBMISC = libmisc.a
|
|
|
|
# -----------------------------------------------------------------------
|
|
|
|
ifeq (.depend,$(wildcard .depend))
|
|
TARGET=everything
|
|
else
|
|
TARGET=depend everything
|
|
endif
|
|
|
|
all: $(TARGET)
|
|
|
|
everything: $(LIBMISC)
|
|
|
|
$(LIBMISC): $(LIBOBJECTS)
|
|
$(AR) r $@ $(LIBOBJECTS)
|
|
$(RANLIB) $@
|
|
|
|
$(PROGS): $(LIBOBJECTS)
|
|
|
|
clean:
|
|
rm -f *.a *.o *~ $(PROGS)
|
|
|
|
distclean: clean
|
|
rm -f .depend Makefile
|
|
|
|
depend:
|
|
$(CPP) $(CFLAGS) -M $(srcdir)/*.c > .depend
|
|
|
|
ifeq (.depend,$(wildcard .depend))
|
|
include .depend
|
|
endif
|