X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=odr%2FMakefile;h=1af7ed43ac1f5bca13f94d6018f0a681818e14af;hb=9edede4a23ba78a2c4a463eabbe7623e7f8d8fbd;hp=deb99e42a28e370c18fe54e34617e74234ac2442;hpb=eb2d32be86dd9b1db4303f37dcd4bc3b8927e5ad;p=yaz-moved-to-github.git diff --git a/odr/Makefile b/odr/Makefile index deb99e4..1af7ed4 100644 --- a/odr/Makefile +++ b/odr/Makefile @@ -1,23 +1,26 @@ # Copyright (C) 1994, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile,v 1.6 1995-03-10 11:44:40 quinn Exp $ +# $Id: Makefile,v 1.20 1995-05-30 10:25:46 quinn Exp $ SHELL=/bin/sh INCLUDE=-I../include -I. -CFLAGS= -g -Wall -pedantic -ansi -DODR_DEBUG +LIBDIR=../lib +LIBINCLUDE=-L$(LIBDIR) +CFLAGS= -g -Wall -pedantic -ansi -DODR_DEBUG DEFS=$(INCLUDE) -LIB=odr.a +LIB=$(LIBDIR)/libodr.a +LIBS=-lodr PO = odr_bool.o ber_bool.o ber_len.o ber_tag.o odr_util.o odr_null.o \ ber_null.o odr_int.o ber_int.o odr_tag.o odr_cons.o odr_seq.o\ odr_oct.o ber_oct.o odr_bit.o ber_bit.o odr_oid.o ber_oid.o odr_use.o \ - odr_choice.o odr_any.o ber_any.o odr.o -CPP=cc -E + odr_choice.o odr_any.o ber_any.o odr.o odr_mem.o +CPP=$(CC) -E -all: $(LIB) +all: $(LIBDIR) $(INCDIR) $(LIB) test: test.o $(LIB) - $(CC) $(CFLAGS) $(INCLUDE) -o test test.o $(LIB) + $(CC) $(CFLAGS) $(LIBINCLUDE) -o test test.o $(LIBS) alll: @@ -26,6 +29,9 @@ $(LIB): $(PO) ar qc $(LIB) $(PO) ranlib $(LIB) +$(LIBDIR): + mkdir $(LIBDIR) + .c.o: $(CC) -c $(DEFS) $(CFLAGS) $< @@ -35,10 +41,9 @@ clean: depend: depend2 depend1: - mv Makefile Makefile.tmp - sed '/^#Depend/q' Makefile - $(CPP) $(INCLUDE) -M *.c >>Makefile - -rm Makefile.tmp + sed '/^#Depend/q' Makefile.tmp + $(CPP) $(DEFS) -M *.c >>Makefile.tmp + mv -f Makefile.tmp Makefile depend2: $(CPP) $(INCLUDE) -M *.c >.depend