2013-06-05 21:37:27 -04:00
|
|
|
# makefile for emacs, updated Thu, Jun 06, 2013 9:29:56 AM
|
2013-05-31 23:58:54 -04:00
|
|
|
|
2013-06-04 23:48:40 -04:00
|
|
|
SRC=ansi.c basic.c bind.c bindable.c buffer.c crypt.c display.c ebind.c eval.c exec.c execute.c file.c fileio.c globals.c ibmpc.c input.c isearch.c line.c lock.c main.c names.c pklock.c posix.c random.c region.c search.c spawn.c tcap.c termio.c utf8.c vmsvt.c vt52.c window.c word.c wrapper.c
|
|
|
|
OBJ=ansi.o basic.o bind.o bindable.o buffer.o crypt.o display.o ebind.o eval.o exec.o execute.o file.o fileio.o globals.o ibmpc.o input.o isearch.o line.o lock.o main.o names.o pklock.o posix.o random.o region.o search.o spawn.o tcap.o termio.o utf8.o vmsvt.o vt52.o window.o word.o wrapper.o
|
2013-06-05 21:37:27 -04:00
|
|
|
HDR=basic.h bind.h bindable.h buffer.h crypt.h display.h ebind.h edef.h efunc.h estruct.h eval.h exec.h execute.h file.h fileio.h input.h isearch.h line.h lock.h names.h pklock.h random.h region.h search.h spawn.h termio.h utf8.h version.h window.h word.h wrapper.h
|
2013-05-31 23:58:54 -04:00
|
|
|
|
|
|
|
# DO NOT ADD OR MODIFY ANY LINES ABOVE THIS -- make source creates them
|
2005-05-31 11:50:56 -04:00
|
|
|
|
2010-02-26 13:48:56 -05:00
|
|
|
# Make the build silent by default
|
|
|
|
V =
|
|
|
|
|
|
|
|
ifeq ($(strip $(V)),)
|
|
|
|
E = @echo
|
|
|
|
Q = @
|
|
|
|
else
|
|
|
|
E = @\#
|
|
|
|
Q =
|
|
|
|
endif
|
|
|
|
export E Q
|
|
|
|
|
2010-08-25 03:35:55 -04:00
|
|
|
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
|
|
|
|
2013-05-16 21:21:59 -04:00
|
|
|
PROGRAM=ue
|
2010-08-29 06:08:13 -04:00
|
|
|
|
2005-05-31 11:50:56 -04:00
|
|
|
CC=gcc
|
2010-02-27 05:38:24 -05:00
|
|
|
WARNINGS=-Wall -Wstrict-prototypes
|
|
|
|
CFLAGS=-O2 $(WARNINGS)
|
2005-05-31 11:50:56 -04:00
|
|
|
#CC=c89 +O3 # HP
|
|
|
|
#CFLAGS= -D_HPUX_SOURCE -DSYSV
|
|
|
|
#CFLAGS=-O4 -DSVR4 # Sun
|
|
|
|
#CFLAGS=-O -qchars=signed # RS/6000
|
2010-08-25 03:35:55 -04:00
|
|
|
ifeq ($(uname_S),Linux)
|
|
|
|
DEFINES=-DAUTOCONF -DPOSIX -DUSG -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE=600
|
|
|
|
endif
|
2012-05-26 10:06:28 -04:00
|
|
|
ifeq ($(uname_S),FreeBSD)
|
|
|
|
DEFINES=-DAUTOCONF -DPOSIX -DSYSV -D_FREEBSD_C_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE=600
|
|
|
|
endif
|
2010-08-25 03:35:55 -04:00
|
|
|
ifeq ($(uname_S),Darwin)
|
|
|
|
DEFINES=-DAUTOCONF -DPOSIX -DSYSV -D_DARWIN_C_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE=600
|
|
|
|
endif
|
2013-04-30 03:24:03 -04:00
|
|
|
ifeq ($(uname_S),CYGWIN_NT-6.1-WOW64)
|
2013-06-07 22:23:23 -04:00
|
|
|
DEFINES=-DAUTOCONF -DCYGWIN -DPROGRAM=$(PROGRAM)
|
2013-04-30 03:24:03 -04:00
|
|
|
endif
|
2005-05-31 11:50:56 -04:00
|
|
|
#DEFINES=-DAUTOCONF
|
|
|
|
#LIBS=-ltermcap # BSD
|
2009-07-15 11:42:47 -04:00
|
|
|
LIBS=-lcurses # SYSV
|
2005-05-31 11:50:56 -04:00
|
|
|
#LIBS=-ltermlib
|
2009-07-15 11:42:47 -04:00
|
|
|
#LIBS=-L/usr/lib/termcap -ltermcap
|
2005-05-31 11:50:56 -04:00
|
|
|
LFLAGS=-hbx
|
|
|
|
BINDIR=/usr/bin
|
|
|
|
LIBDIR=/usr/lib
|
|
|
|
|
2010-08-29 06:08:13 -04:00
|
|
|
$(PROGRAM): $(OBJ)
|
2010-02-26 13:48:56 -05:00
|
|
|
$(E) " LINK " $@
|
2011-08-21 06:39:10 -04:00
|
|
|
$(Q) $(CC) $(LDFLAGS) $(DEFINES) -o $@ $(OBJ) $(LIBS)
|
2005-05-31 11:50:56 -04:00
|
|
|
|
2005-09-30 18:28:37 -04:00
|
|
|
SPARSE=sparse
|
2006-11-19 14:28:19 -05:00
|
|
|
SPARSE_FLAGS=-D__LITTLE_ENDIAN__ -D__x86_64__ -D__linux__ -D__unix__
|
2005-09-30 18:28:37 -04:00
|
|
|
|
|
|
|
sparse:
|
2005-11-16 20:13:35 -05:00
|
|
|
$(SPARSE) $(SPARSE_FLAGS) $(DEFINES) $(SRC)
|
2005-09-30 18:28:37 -04:00
|
|
|
|
2005-05-31 11:50:56 -04:00
|
|
|
clean:
|
2010-02-26 13:48:56 -05:00
|
|
|
$(E) " CLEAN"
|
2010-08-29 06:08:13 -04:00
|
|
|
$(Q) rm -f $(PROGRAM) core lintout makeout tags makefile.bak *.o
|
2005-05-31 11:50:56 -04:00
|
|
|
|
2010-08-29 06:08:13 -04:00
|
|
|
install: $(PROGRAM)
|
|
|
|
strip $(PROGRAM)
|
2013-05-16 21:21:59 -04:00
|
|
|
cp $(PROGRAM) ${BINDIR}
|
2005-05-31 11:50:56 -04:00
|
|
|
cp emacs.hlp ${LIBDIR}
|
|
|
|
cp emacs.rc ${LIBDIR}/.emacsrc
|
2013-05-16 21:21:59 -04:00
|
|
|
chmod 755 ${BINDIR}/$(PROGRAM)
|
2005-05-31 11:50:56 -04:00
|
|
|
chmod 644 ${LIBDIR}/emacs.hlp ${LIBDIR}/.emacsrc
|
|
|
|
|
|
|
|
lint: ${SRC}
|
|
|
|
@rm -f lintout
|
|
|
|
lint ${LFLAGS} ${SRC} >lintout
|
|
|
|
cat lintout
|
|
|
|
|
|
|
|
errs:
|
|
|
|
@rm -f makeout
|
2013-05-16 21:21:59 -04:00
|
|
|
make $(PROGRAM) >makeout
|
2005-05-31 11:50:56 -04:00
|
|
|
|
|
|
|
tags: ${SRC}
|
|
|
|
@rm -f tags
|
|
|
|
ctags ${SRC}
|
|
|
|
|
|
|
|
source:
|
|
|
|
@mv makefile makefile.bak
|
|
|
|
@echo "# makefile for emacs, updated `date`" >makefile
|
|
|
|
@echo '' >>makefile
|
|
|
|
@echo SRC=`ls *.c` >>makefile
|
|
|
|
@echo OBJ=`ls *.c | sed s/c$$/o/` >>makefile
|
|
|
|
@echo HDR=`ls *.h` >>makefile
|
|
|
|
@echo '' >>makefile
|
|
|
|
@sed -n -e '/^# DO NOT ADD OR MODIFY/,$$p' <makefile.bak >>makefile
|
|
|
|
|
|
|
|
depend: ${SRC}
|
|
|
|
@for i in ${SRC}; do\
|
2013-05-31 23:39:15 -04:00
|
|
|
cc ${DEFINES} -MM $$i ; done >makedep
|
2005-05-31 11:50:56 -04:00
|
|
|
@echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
|
|
|
|
@echo '$$r ./makedep' >>eddep
|
|
|
|
@echo 'w' >>eddep
|
|
|
|
@cp makefile makefile.bak
|
|
|
|
@ed - makefile <eddep
|
|
|
|
@rm eddep makedep
|
|
|
|
@echo '' >>makefile
|
|
|
|
@echo '# DEPENDENCIES MUST END AT END OF FILE' >>makefile
|
|
|
|
@echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >>makefile
|
|
|
|
@echo '# see make depend above' >>makefile
|
|
|
|
|
2013-05-31 23:39:15 -04:00
|
|
|
# @for i in ${SRC}; do\
|
|
|
|
# cc ${DEFINES} -M $$i | sed -e 's, \./, ,' | grep -v '/usr/include' | \
|
|
|
|
# awk '{ if ($$1 != prev) { if (rec != "") print rec; \
|
|
|
|
# rec = $$0; prev = $$1; } \
|
|
|
|
# else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
|
|
|
|
# else rec = rec " " $$2 } } \
|
|
|
|
# END { print rec }'; done >makedep
|
|
|
|
|
2005-05-31 11:50:56 -04:00
|
|
|
.c.o:
|
2010-02-26 13:48:56 -05:00
|
|
|
$(E) " CC " $@
|
|
|
|
$(Q) ${CC} ${CFLAGS} ${DEFINES} -c $*.c
|
2005-05-31 11:50:56 -04:00
|
|
|
|
|
|
|
# DO NOT DELETE THIS LINE -- make depend uses it
|
|
|
|
|
2013-05-31 23:58:54 -04:00
|
|
|
ansi.o: ansi.c estruct.h line.h utf8.h edef.h
|
2013-05-31 23:39:15 -04:00
|
|
|
basic.o: basic.c basic.h display.h estruct.h line.h utf8.h edef.h input.h \
|
2013-06-03 04:29:33 -04:00
|
|
|
random.h word.h
|
2013-06-04 23:48:40 -04:00
|
|
|
bind.o: bind.c bind.h edef.h estruct.h line.h utf8.h bindable.h buffer.h \
|
|
|
|
display.h ebind.h exec.h file.h fileio.h input.h names.h window.h
|
2013-06-05 21:37:27 -04:00
|
|
|
bindable.o: bindable.c bindable.h buffer.h estruct.h line.h utf8.h \
|
|
|
|
display.h edef.h file.h input.h
|
2013-05-31 23:39:15 -04:00
|
|
|
buffer.o: buffer.c buffer.h estruct.h line.h utf8.h display.h edef.h \
|
2013-06-03 04:29:33 -04:00
|
|
|
file.h input.h window.h
|
2013-05-31 23:39:15 -04:00
|
|
|
crypt.o: crypt.c crypt.h display.h estruct.h line.h utf8.h edef.h input.h
|
|
|
|
display.o: display.c display.h estruct.h line.h utf8.h edef.h termio.h \
|
2013-06-03 04:29:33 -04:00
|
|
|
version.h wrapper.h window.h
|
2013-05-31 23:39:15 -04:00
|
|
|
ebind.o: ebind.c ebind.h basic.h bind.h edef.h estruct.h line.h utf8.h \
|
2013-06-04 23:48:40 -04:00
|
|
|
bindable.h buffer.h crypt.h eval.h exec.h file.h isearch.h random.h \
|
2013-06-03 04:29:33 -04:00
|
|
|
region.h search.h spawn.h window.h word.h
|
2013-05-31 23:39:15 -04:00
|
|
|
eval.o: eval.c eval.h estruct.h line.h utf8.h basic.h bind.h edef.h \
|
2013-06-03 04:29:33 -04:00
|
|
|
buffer.h display.h exec.h fileio.h input.h random.h search.h termio.h \
|
|
|
|
version.h window.h
|
2013-05-31 23:39:15 -04:00
|
|
|
exec.o: exec.c exec.h estruct.h line.h utf8.h buffer.h bind.h edef.h \
|
2013-06-03 04:29:33 -04:00
|
|
|
display.h eval.h file.h input.h
|
2013-06-03 23:52:28 -04:00
|
|
|
execute.o: execute.c edef.h estruct.h line.h utf8.h bind.h random.h \
|
|
|
|
display.h file.h
|
2013-05-31 23:39:15 -04:00
|
|
|
file.o: file.c file.h buffer.h estruct.h line.h utf8.h crypt.h display.h \
|
2013-06-03 23:52:28 -04:00
|
|
|
edef.h execute.h fileio.h input.h lock.h window.h
|
2013-05-31 23:39:15 -04:00
|
|
|
fileio.o: fileio.c fileio.h crypt.h display.h estruct.h line.h utf8.h \
|
2013-06-03 04:29:33 -04:00
|
|
|
edef.h
|
2013-05-31 23:58:54 -04:00
|
|
|
globals.o: globals.c estruct.h line.h utf8.h edef.h
|
|
|
|
ibmpc.o: ibmpc.c estruct.h line.h utf8.h edef.h
|
2013-06-04 23:48:40 -04:00
|
|
|
input.o: input.c input.h edef.h estruct.h line.h utf8.h bind.h bindable.h \
|
|
|
|
display.h exec.h names.h wrapper.h
|
2013-05-31 23:39:15 -04:00
|
|
|
isearch.o: isearch.c isearch.h basic.h display.h estruct.h line.h utf8.h \
|
2013-06-03 04:29:33 -04:00
|
|
|
edef.h input.h search.h
|
|
|
|
line.o: line.c line.h utf8.h basic.h display.h estruct.h edef.h random.h
|
|
|
|
lock.o: lock.c lock.h estruct.h line.h utf8.h display.h edef.h input.h
|
2013-06-05 21:37:27 -04:00
|
|
|
main.o: main.c basic.h bind.h edef.h estruct.h line.h utf8.h bindable.h \
|
|
|
|
buffer.h crypt.h display.h eval.h execute.h file.h input.h lock.h \
|
|
|
|
random.h search.h termio.h version.h
|
2013-05-31 23:58:54 -04:00
|
|
|
names.o: names.c names.h basic.h bind.h edef.h estruct.h line.h utf8.h \
|
2013-06-04 23:48:40 -04:00
|
|
|
bindable.h buffer.h display.h eval.h exec.h crypt.h file.h isearch.h \
|
2013-06-03 04:29:33 -04:00
|
|
|
region.h random.h search.h spawn.h window.h word.h
|
2013-05-31 23:39:15 -04:00
|
|
|
pklock.o: pklock.c pklock.h estruct.h line.h utf8.h edef.h
|
2013-06-03 04:29:33 -04:00
|
|
|
posix.o: posix.c termio.h
|
2013-05-31 23:39:15 -04:00
|
|
|
random.o: random.c random.h basic.h display.h estruct.h line.h utf8.h \
|
2013-06-03 23:52:28 -04:00
|
|
|
edef.h execute.h input.h search.h
|
2013-06-03 04:29:33 -04:00
|
|
|
region.o: region.c region.h estruct.h line.h utf8.h display.h edef.h
|
2013-05-31 23:39:15 -04:00
|
|
|
search.o: search.c search.h estruct.h line.h utf8.h basic.h display.h \
|
2013-06-03 04:29:33 -04:00
|
|
|
edef.h input.h
|
2013-05-31 23:39:15 -04:00
|
|
|
spawn.o: spawn.c spawn.h buffer.h estruct.h line.h utf8.h display.h \
|
2013-06-03 04:29:33 -04:00
|
|
|
edef.h file.h input.h window.h
|
2013-05-31 23:39:15 -04:00
|
|
|
tcap.o: tcap.c display.h estruct.h line.h utf8.h edef.h termio.h
|
2013-06-03 04:29:33 -04:00
|
|
|
termio.o: termio.c termio.h estruct.h line.h utf8.h edef.h
|
2013-05-31 23:58:54 -04:00
|
|
|
utf8.o: utf8.c utf8.h
|
|
|
|
vmsvt.o: vmsvt.c estruct.h line.h utf8.h edef.h
|
|
|
|
vt52.o: vt52.c estruct.h line.h utf8.h edef.h
|
2013-05-31 23:39:15 -04:00
|
|
|
window.o: window.c window.h estruct.h line.h utf8.h basic.h display.h \
|
2013-06-03 23:52:28 -04:00
|
|
|
edef.h execute.h wrapper.h
|
2013-05-31 23:39:15 -04:00
|
|
|
word.o: word.c word.h basic.h display.h estruct.h line.h utf8.h edef.h \
|
2013-06-03 04:29:33 -04:00
|
|
|
random.h region.h
|
2013-05-01 02:00:16 -04:00
|
|
|
wrapper.o: wrapper.c wrapper.h
|
2005-05-31 11:50:56 -04:00
|
|
|
|
|
|
|
# DEPENDENCIES MUST END AT END OF FILE
|
|
|
|
# IF YOU PUT STUFF HERE IT WILL GO AWAY
|
|
|
|
# see make depend above
|