# # Makefile for the Vietnamese type-classification routines # SHELL = /bin/sh VNLIBDIR= .. VNINCDIR= ../../include .SUFFIXES: .src .i .srt SRCS = vntype.c toupper.c tolower.c OBJS = vntype.o toupper.o tolower.o LIB = $(VNLIBDIR)/libvntype.a INC = -I$(VNINCDIR) #FLAGS = -DNOANSI_C CFLAGS = $(FLAGS) $(INC) CC = cc CPP = /lib/cpp .c.o: $(CC) $(CFLAGS) -c $*.c .i.srt: @echo -n "Generating $@ from $*.i..." @$(CPP) $(INC) $*.i | egrep '^%' | \ sed -e 's/==/\//g' \ -e 's/[ ][ ]*/ /g' \ | sort -n +3 -n +4 | sed 's/ 999//' | uniq -3 > $*.srt @echo " Done." .src.c: @make $*.srt @echo -n "Generating $@ from $*.src..." @$(CPP) $(INC) $*.src | egrep '^%' | \ sed -e 's/^%//g' \ -e 's/[ ][ ]*/ /g' \ > $@ @rm -f $*.srt @echo " Done." all: $(LIB) $(SRCS) $(LIB): $(OBJS) ar r $(LIB) $(OBJS) ranlib $(LIB) clean: rm -f *.o *.srt core $(LIB) $(SRCS) # dependencies