#
# Makefile for the ipsec routines
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definition is now in the main makefile...

# The desgnu assembly file seems to be optimized for Pentiums and less.
# The c code is much faster on a pentium pro

all: des.o

DES_OBJS := deskey.o descbc.o check_key.o 3descbc.o

ifeq ($(CONFIG_M586),y)
DES_OBJS += desgnu.o desspa.o
else
DES_OBJS += desport.o desspc.o
endif

include $(TOPDIR)/Rules.make

# GNU as seems confused by what should be legal comments. Double quotes
# in comments apparently start strings that extend past the end of line,
# and the "# file 1" lines emitted by cpp also seem to confuse it. So
# we strip out all the offending material.
desgnu.o: desgnu.S
	cpp desgnu.S | tr -d '"' | sed -e '/^#/d' | as -o desgnu.o

des.o: $(DES_OBJS)
	$(LD) $(LD_RFLAG) -r -o $@ $(DES_OBJS)
