# # Master Makefile for the ITTC project tree # # run ./config to make this happen include Config_local # These variables are passed to subdirectories... AR = ar ruv # Pathname tricks for subdirectories... # Should use current and best stable version. SSLeay = ../openssl-0.9.8d SUB_SSLeay = ../$(SSLeay) INCLUDES = -Iinclude -I$(SSLeay)/include SUB_INCLUDES = -I../include -I$(SUB_SSLeay)/include CFLAGS = $(COPTS) $(DEFINES) $(INCLUDES) SUB_CFLAGS = $(COPTS) $(DEFINES) $(SUB_INCLUDES) LIB = libittc.a SUB_LIB = ../libittc.a # hmm, searching here seems bad, may result in finding the system ones # LDFLAGS = -L. -littc -L$(SSLeay) -lssl -lcrypto $(OSLIBS) -g # SUB_LDFLAGS = -L.. -littc -L$(SUB_SSLeay) -lssl -lcrypto $(OSLIBS) -g LDFLAGS = $(LIB) $(SSLeay)/libssl.a $(SSLeay)/libcrypto.a $(OSLIBS) -g SUB_LDFLAGS = $(SUB_LIB) $(SUB_SSLeay)/libssl.a $(SUB_SSLeay)/libcrypto.a $(OSLIBS) -g # Top-level only SUBDIRS = UTL COM KEY TLB NTD GEN REF CTL ADM monitor apps #tests LIBOBJ = ittclib.o all: $(LIB) subdirs $(LIB): $(LIBOBJ) $(AR) $(LIB) $(LIBOBJ) -$(RANLIB) $(LIB) subdirs: @for i in $(SUBDIRS) ;\ do \ (cd $$i; echo "making in $$i ..."; \ $(MAKE) CC='$(CC)' CFLAGS='$(SUB_CFLAGS)' LDFLAGS='$(SUB_LDFLAGS)' LIB='$(SUB_LIB)' SSLeay='$(SUB_SSLeay)' AR='$(AR)' RANLIB='$(RANLIB)' all ); \ done clean: $(RM) *.o *.a *~ @for i in $(SUBDIRS) ;\ do \ (cd $$i; echo "cleaning in $$i ..."; \ $(MAKE) CC='$(CC)' CFLAGS='$(SUB_CFLAGS)' LDFLAGS='$(SUB_LDFLAGS)' LIB='$(SUB_LIB)' SSLeay='$(SUB_SSLeay)' AR='$(AR)' RANLIB='$(RANLIB)' clean ); \ done install: all killall ittcd || true mkdir -p $(BIN) cp ADM/admittc apps/ittc_ca apps/ittc_req CTL/ittcd monitor/monitor $(BIN)