Annotation of loncom/homework/CAPA-converter/Makefile, revision 1.1

1.1     ! albertel    1: # ==================================================================
        !             2: #     Makefile for CAPA 5.1
        !             3: # ==================================================================
        !             4: 
        !             5: VER = 5.1
        !             6: BUGFIX = 0
        !             7: #CC = i486-linuxlibc1-gcc  -DCAPA_VER=\"$(VER).$(BUGFIX)\" -DCOMPILE_DATE=\"`date +'%b-%d-%Y'`\" 
        !             8: CC = cc  -DCAPA_VER=\"$(VER).$(BUGFIX)\" -DCOMPILE_DATE=\"`date +'%b-%d-%Y-%H:%M'`\" 
        !             9: DEF = -DUSE_DYNAMIC_SYMBOLS
        !            10: CFLAG = -g -Wall 
        !            11: LEX = flex -Cfa -s
        !            12: YACC = bison
        !            13: AR = ar
        !            14: MV = mv
        !            15: RM = rm
        !            16: STRIP = echo 
        !            17: #STRIP = strip
        !            18: LEXFLAG = -v
        !            19: 
        !            20: # OSF1, SunOS, Linux, NEXTSTEP, HP-UX, IRIX
        !            21: 
        !            22: ARCH = $(shell uname)
        !            23: Linux = /usr/lib/libncurses.a 
        !            24: 
        !            25: P_FLAGS =  -ll -lm 
        !            26: 
        !            27: S_FLAGS =  $($(ARCH)) $(P_FLAGS)
        !            28: 
        !            29: OSF1FLAG = -O3 -Olimit 2048
        !            30: 
        !            31: #ARCH = $(shell uname)
        !            32: #  Architecture speicifc subdirectory
        !            33: #  output from uname command
        !            34: #
        !            35: # Architectural note:
        !            36: #  on NeXT compiling libcapa   after the final step, 
        !            37: #  ranlib libcapa4.5.a
        !            38: # 
        !            39: #  HP-UX
        !            40: #    alloca() could not linked by ld
        !            41: #    file capaParserFun.c contains alloca definition
        !            42: #      add <stdlib.h> and <alloca.h> after __hpux
        !            43: #    gmake is not available on HP-UX DECS
        !            44: 
        !            45: PAR_SRC = capaCommon.c capaFunction.c capaParserFun.c capaLexerFun.c 
        !            46: 
        !            47: PAR_OBJ = $(PAR_SRC:.c=.o)
        !            48: 
        !            49: ARCH_OBJ = $(ARCH)/capaCommon.o   $(ARCH)/capaLexerFun.o \
        !            50:            $(ARCH)/capaParserFun.o   
        !            51: ## ===================================================================
        !            52: 
        !            53: #  conditional macros in alpha 
        !            54: #
        !            55: # libcapa:=MACRO=string
        !            56: 
        !            57: 
        !            58: answers: $(ARCH)/answers
        !            59: 	echo done
        !            60: 
        !            61: all: $(ARCH)libcapa($VER).a $(ARCH)/answers 
        !            62: 
        !            63: dmalloc: 
        !            64: 	$(MAKE) DEF="-DDMALLOC -DDMALLOC_FUNC_CHECK $(DEF)" P_FLAGS="-ldmalloc $(P_FLAGS)" libcapa answers
        !            65: 
        !            66: $(ARCH)libcapa($VER).a: $(ARCH_OBJ)
        !            67: 	$(AR) r $(ARCH)/libcapa$(VER).a $(ARCH_OBJ) 
        !            68: 
        !            69: binclean:
        !            70: 	$(RM) $(ARCH)/*.o $(ARCH)/*.a
        !            71: 
        !            72: $(ARCH)/%.o: %.c capaToken.h
        !            73: 	$(CC) $(CFLAG) -c $< -o $@ $(DEF)
        !            74: 
        !            75: $(ARCH)/answers: $(ARCH)libcapa($VER).a $(ARCH)/answers.o
        !            76: 	$(CC) $(CFLAG) $(DEF) -o $@ $(ARCH)/answers.o -L$(ARCH) -lcapa$(VER) $(P_FLAGS)
        !            77: 
        !            78: capaToken.h: capaParserFun.c
        !            79: 
        !            80: capaParserFun.c: capaGrammarDef.y
        !            81: 	$(YACC) -d $< --output=$@
        !            82: 	mv capaParserFun.h capaToken.h
        !            83: 
        !            84: capaLexerFun.c: capaLexerDef.flex capaToken.h
        !            85: 	$(LEX) -o$@ $<
        !            86: 
        !            87: clean:
        !            88: 	rm $(ARCH)/*.o
        !            89: 	rm $(ARCH)/libcapa$(VER).a
        !            90: 	rm capaToken.h
        !            91: 	rm capaParserFun.c
        !            92: 	rm capaLexerFun.c
        !            93: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>