# $Id: Makefile.common,v 1.17 2004/03/21 14:25:56 tksoh Exp $ # Platform independent part of make procedure for NEdit directory, # included by machine specific makefiles. # OBJS = nedit.o file.o menu.o window.o selection.o search.o undo.o shift.o \ help.o preferences.o tags.o userCmds.o shell.o regularExp.o macro.o \ text.o textSel.o textDisp.o textBuf.o textDrag.o server.o highlight.o \ highlightData.o interpret.o parse.o smartIndent.o regexConvert.o \ rbTree.o windowTitle.o calltips.o server_common.o rangeset.o XLTLIB = ../Xlt/libXlt.a XMLLIB = ../Microline/XmL/libXmL.a .c.o: $(CC) -c -I../Microline -I../Xlt $(CFLAGS) -o $@ $< all: nedit nc # Note there is no depedency for linkdate.c/o. This is intentional, # we only want natural rebuilds to regenerate the link date. nedit: $(OBJS) ../util/libNUtil.a $(XMLLIB) $(XLTLIB) $(CC) $(CFLAGS) -c linkdate.c $(CC) $(CFLAGS) $(OBJS) linkdate.o $(XMLLIB) \ $(XLTLIB) ../util/libNUtil.a $(LIBS) -o $@ # Note LIBS isn't quite right here; it links unnecessarily against Motif nc: nc.o server_common.o ../util/libNUtil.a $(CC) $(CFLAGS) nc.o server_common.o ../util/libNUtil.a $(LIBS) -o $@ install: nedit nc ${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} nedit ${PREFIX}/bin ${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} nc ${PREFIX}/bin/nclient help.o: help.c $(CC) $(CFLAGS) $(BIGGER_STRINGS) -c help.c -o $@ smartIndent.o: smartIndent.c $(CC) $(CFLAGS) $(BIGGER_STRINGS) -c smartIndent.c -o $@ highlightData.o: highlightData.c $(CC) $(CFLAGS) $(BIGGER_STRINGS) -c highlightData.c -o $@ clean: rm -f $(OBJS) nedit nc nc.o parse.c linkdate.o parse.c: parse.y @echo "NOTE: Don't worry about 'command not found' errors here" @echo " unless you have changed the parse.y file." bison -o parse.c parse.y || ( yacc parse.y && mv y.tab.c parse.c ) || \ cp parse_noyacc.c parse.c # Get the dependencies for all objects include Makefile.dependencies