2019-06-19 07:49:20 -04:00
|
|
|
# Makefile for emacs, updated Tue, Jul 31, 2018 20:37:16
|
2013-05-31 23:58:54 -04:00
|
|
|
|
2019-06-19 07:49:20 -04:00
|
|
|
SRC=basic.c bind.c bindable.c buffer.c display.c ebind.c eval.c exec.c execute.c file.c fileio.c flook.c input.c isearch.c line.c lock.c main.c mingw32.c mlout.c names.c pklock.c posix.c random.c region.c search.c spawn.c tcap.c termio.c utf8.c util.c window.c word.c wrapper.c wscreen.c
|
|
|
|
OBJ=basic.o bind.o bindable.o buffer.o display.o ebind.o eval.o exec.o execute.o file.o fileio.o flook.o input.o isearch.o line.o lock.o main.o mingw32.o mlout.o names.o pklock.o posix.o random.o region.o search.o spawn.o tcap.o termio.o utf8.o util.o window.o word.o wrapper.o wscreen.o
|
|
|
|
HDR=basic.h bind.h bindable.h buffer.h defines.h display.h ebind.h estruct.h eval.h exec.h execute.h file.h fileio.h flook.h input.h isearch.h line.h lock.h mlout.h names.h pklock.h random.h region.h retcode.h search.h spawn.h terminal.h termio.h utf8.h util.h version.h window.h word.h wrapper.h wscreen.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')
|
2015-02-11 02:19:11 -05:00
|
|
|
# for windows based target, insure we strip the variant part
|
|
|
|
# CYGWIN_NT-6.1, CYGWIN_NT-6.1-WOW, CYGWIN_NT-6.1-WOW64, MINGW32_NT-6.1
|
|
|
|
uname_S := $(shell sh -c 'echo $(uname_S) | sed s/_.*$$//')
|
2010-08-25 03:35:55 -04:00
|
|
|
|
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
|
2015-11-24 21:42:33 -05:00
|
|
|
WARNINGS=-pedantic -Wall -Wextra -Wstrict-prototypes -Wno-unused-parameter
|
2010-02-27 05:38:24 -05:00
|
|
|
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)
|
2017-05-05 20:51:02 -04:00
|
|
|
DEFINES=-DAUTOCONF -DPROGRAM=$(PROGRAM) -DPOSIX -DUSG
|
2014-12-24 21:51:47 -05:00
|
|
|
LIBS=-lcurses
|
2010-08-25 03:35:55 -04:00
|
|
|
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
|
2015-02-11 02:19:11 -05:00
|
|
|
ifeq ($(uname_S),CYGWIN)
|
2016-02-12 00:11:50 -05:00
|
|
|
DEFINES=-DAUTOCONF -DCYGWIN -DSYSV -DPROGRAM=$(PROGRAM)
|
2015-02-13 21:21:50 -05:00
|
|
|
LIBS=-lcurses
|
2013-04-30 03:24:03 -04:00
|
|
|
endif
|
2015-02-11 02:19:11 -05:00
|
|
|
ifeq ($(uname_S),MINGW32)
|
2019-06-19 07:49:20 -04:00
|
|
|
# DEFINES=-DAUTOCONF -DSYSV -DMINGW32 -DPROGRAM=$(PROGRAM)
|
|
|
|
DEFINES=-DAUTOCONF -DPOSIX -DSYSV -DPROGRAM=$(PROGRAM) -IC:/MinGW/include/ncursesw
|
2014-06-18 02:59:40 -04:00
|
|
|
LIBS=
|
2013-09-14 01:54:23 -04:00
|
|
|
endif
|
2005-05-31 11:50:56 -04:00
|
|
|
#DEFINES=-DAUTOCONF
|
|
|
|
#LIBS=-ltermcap # BSD
|
2014-06-18 02:59:40 -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"
|
2013-09-20 22:24:45 -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
|
|
|
|
|
2015-02-16 00:41:59 -05:00
|
|
|
splint:
|
2015-03-15 22:46:51 -04:00
|
|
|
splint -weak $(DEFINES) $(SRC) -booltype boolean -booltrue TRUE -boolfalse FALSE +posixlib +matchanyintegral
|
2015-02-16 00:41:59 -05:00
|
|
|
|
2005-05-31 11:50:56 -04:00
|
|
|
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:
|
2013-09-20 22:24:45 -04:00
|
|
|
@mv Makefile Makefile.bak
|
|
|
|
@echo "# Makefile for emacs, updated `date`" >Makefile
|
|
|
|
@echo '' >>Makefile
|
2015-02-11 07:22:43 -05:00
|
|
|
#Sorted
|
2013-09-20 22:24:45 -04:00
|
|
|
@echo SRC=`ls *.c` >>Makefile
|
|
|
|
@echo OBJ=`ls *.c | sed s/c$$/o/` >>Makefile
|
|
|
|
@echo HDR=`ls *.h` >>Makefile
|
2015-02-11 07:22:43 -05:00
|
|
|
#UnSorted
|
|
|
|
# @echo SRC=$(wildcard *.c) >>Makefile
|
|
|
|
# @echo OBJ=$(patsubst %.c,%.o,$(wildcard *.c)) >>Makefile
|
|
|
|
# @echo HDR=$(wildcard *.h) >>Makefile
|
2013-09-20 22:24:45 -04:00
|
|
|
@echo '' >>Makefile
|
|
|
|
@sed -n -e '/^# DO NOT ADD OR MODIFY/,$$p' <Makefile.bak >>Makefile
|
2005-05-31 11:50:56 -04:00
|
|
|
|
|
|
|
depend: ${SRC}
|
2014-12-30 20:47:15 -05:00
|
|
|
@mv Makefile Makefile.bak
|
|
|
|
@sed -n -e '1,/^# DO NOT DELETE THIS LINE/p' Makefile.bak > Makefile
|
|
|
|
@echo >> Makefile
|
2005-05-31 11:50:56 -04:00
|
|
|
@for i in ${SRC}; do\
|
2017-05-16 19:49:03 -04:00
|
|
|
$(CC) ${DEFINES} -MM $$i ; done >> Makefile
|
2013-09-20 22:24:45 -04:00
|
|
|
@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
|
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
|
|
|
|
|
2016-05-22 10:22:39 -04:00
|
|
|
basic.o: basic.c basic.h retcode.h input.h bind.h mlout.h random.h \
|
|
|
|
terminal.h defines.h utf8.h window.h buffer.h line.h
|
2016-03-23 09:11:05 -04:00
|
|
|
bind.o: bind.c bind.h estruct.h bindable.h buffer.h line.h retcode.h \
|
2019-06-19 07:49:20 -04:00
|
|
|
utf8.h display.h ebind.h exec.h file.h flook.h input.h names.h util.h \
|
|
|
|
window.h defines.h
|
2016-03-23 09:11:05 -04:00
|
|
|
bindable.o: bindable.c bindable.h defines.h buffer.h line.h retcode.h \
|
|
|
|
utf8.h display.h estruct.h file.h input.h bind.h lock.h mlout.h \
|
|
|
|
terminal.h
|
|
|
|
buffer.o: buffer.c buffer.h line.h retcode.h utf8.h defines.h estruct.h \
|
2019-06-19 07:49:20 -04:00
|
|
|
file.h input.h bind.h mlout.h util.h window.h
|
2016-04-08 23:46:40 -04:00
|
|
|
display.o: display.c display.h estruct.h utf8.h buffer.h line.h retcode.h \
|
2016-03-23 09:11:05 -04:00
|
|
|
input.h bind.h termio.h terminal.h defines.h version.h wrapper.h \
|
|
|
|
window.h
|
2016-05-22 10:22:39 -04:00
|
|
|
ebind.o: ebind.c ebind.h basic.h retcode.h bind.h estruct.h bindable.h \
|
|
|
|
buffer.h line.h utf8.h eval.h exec.h file.h isearch.h random.h region.h \
|
2016-03-23 09:11:05 -04:00
|
|
|
search.h spawn.h window.h defines.h word.h
|
2016-05-22 10:22:39 -04:00
|
|
|
eval.o: eval.c eval.h basic.h retcode.h bind.h buffer.h line.h utf8.h \
|
2016-03-23 09:11:05 -04:00
|
|
|
display.h estruct.h exec.h execute.h flook.h input.h random.h search.h \
|
2019-06-19 07:49:20 -04:00
|
|
|
terminal.h defines.h termio.h util.h version.h window.h
|
2016-03-23 09:11:05 -04:00
|
|
|
exec.o: exec.c exec.h retcode.h buffer.h line.h utf8.h bind.h display.h \
|
2019-06-19 07:49:20 -04:00
|
|
|
estruct.h eval.h file.h flook.h input.h random.h util.h window.h \
|
|
|
|
defines.h
|
2016-02-24 08:17:45 -05:00
|
|
|
execute.o: execute.c execute.h estruct.h bind.h random.h retcode.h \
|
2016-04-08 23:46:40 -04:00
|
|
|
display.h utf8.h file.h buffer.h line.h input.h mlout.h search.h \
|
2016-03-01 06:17:39 -05:00
|
|
|
terminal.h defines.h window.h
|
2016-03-23 09:11:05 -04:00
|
|
|
file.o: file.c file.h buffer.h line.h retcode.h utf8.h defines.h \
|
2016-02-12 00:11:50 -05:00
|
|
|
display.h estruct.h execute.h fileio.h input.h bind.h lock.h mlout.h \
|
2019-06-19 07:49:20 -04:00
|
|
|
util.h window.h
|
2016-03-23 09:11:05 -04:00
|
|
|
fileio.o: fileio.c fileio.h defines.h retcode.h utf8.h
|
|
|
|
flook.o: flook.c flook.h retcode.h defines.h fileio.h
|
2016-04-08 23:46:40 -04:00
|
|
|
input.o: input.c input.h bind.h estruct.h bindable.h display.h utf8.h \
|
|
|
|
exec.h retcode.h names.h terminal.h defines.h wrapper.h
|
2016-05-22 10:22:39 -04:00
|
|
|
isearch.o: isearch.c isearch.h basic.h retcode.h buffer.h line.h utf8.h \
|
2016-03-23 09:11:05 -04:00
|
|
|
display.h estruct.h exec.h input.h bind.h search.h terminal.h defines.h \
|
2019-06-19 07:49:20 -04:00
|
|
|
util.h window.h
|
2016-03-23 09:11:05 -04:00
|
|
|
line.o: line.c line.h retcode.h utf8.h buffer.h estruct.h mlout.h \
|
2013-10-10 00:33:13 -04:00
|
|
|
window.h defines.h
|
2017-05-07 02:05:47 -04:00
|
|
|
lock.o: lock.c estruct.h lock.h
|
2016-05-22 10:22:39 -04:00
|
|
|
main.o: main.c estruct.h basic.h retcode.h bind.h bindable.h buffer.h \
|
|
|
|
line.h utf8.h display.h eval.h execute.h file.h lock.h mlout.h random.h \
|
2019-06-19 07:49:20 -04:00
|
|
|
search.h terminal.h defines.h termio.h util.h version.h window.h
|
2014-11-17 00:09:13 -05:00
|
|
|
mingw32.o: mingw32.c
|
2015-02-12 23:31:59 -05:00
|
|
|
mlout.o: mlout.c mlout.h
|
2016-05-22 10:22:39 -04:00
|
|
|
names.o: names.c names.h basic.h retcode.h bind.h bindable.h buffer.h \
|
|
|
|
line.h utf8.h display.h estruct.h eval.h exec.h file.h isearch.h \
|
2016-03-23 09:11:05 -04:00
|
|
|
region.h random.h search.h spawn.h window.h defines.h word.h
|
2013-10-10 23:20:06 -04:00
|
|
|
pklock.o: pklock.c estruct.h pklock.h
|
2017-05-07 02:05:47 -04:00
|
|
|
posix.o: posix.c
|
2016-03-23 09:11:05 -04:00
|
|
|
random.o: random.c random.h retcode.h basic.h buffer.h line.h utf8.h \
|
|
|
|
display.h estruct.h execute.h input.h bind.h search.h terminal.h \
|
2015-02-12 23:31:59 -05:00
|
|
|
defines.h window.h
|
2016-03-23 09:11:05 -04:00
|
|
|
region.o: region.c region.h line.h retcode.h utf8.h buffer.h estruct.h \
|
|
|
|
mlout.h random.h window.h defines.h
|
2015-02-12 22:54:17 -05:00
|
|
|
search.o: search.c search.h line.h retcode.h utf8.h basic.h buffer.h \
|
2019-06-19 07:49:20 -04:00
|
|
|
display.h estruct.h input.h bind.h mlout.h terminal.h defines.h util.h \
|
|
|
|
window.h
|
2016-03-23 09:11:05 -04:00
|
|
|
spawn.o: spawn.c spawn.h defines.h buffer.h line.h retcode.h utf8.h \
|
|
|
|
display.h estruct.h exec.h file.h flook.h input.h bind.h terminal.h \
|
2013-10-10 00:33:13 -04:00
|
|
|
window.h
|
2016-04-08 23:46:40 -04:00
|
|
|
tcap.o: tcap.c terminal.h defines.h retcode.h utf8.h display.h estruct.h \
|
2013-10-10 00:33:13 -04:00
|
|
|
termio.h
|
2017-05-07 02:05:47 -04:00
|
|
|
termio.o: termio.c termio.h utf8.h estruct.h retcode.h
|
2013-05-31 23:58:54 -04:00
|
|
|
utf8.o: utf8.c utf8.h
|
2019-06-19 07:49:20 -04:00
|
|
|
util.o: util.c util.h
|
2016-03-23 09:11:05 -04:00
|
|
|
window.o: window.c window.h defines.h buffer.h line.h retcode.h utf8.h \
|
|
|
|
basic.h display.h estruct.h execute.h terminal.h wrapper.h
|
2016-05-22 10:22:39 -04:00
|
|
|
word.o: word.c word.h basic.h retcode.h buffer.h line.h utf8.h estruct.h \
|
2016-03-23 09:11:05 -04:00
|
|
|
mlout.h random.h region.h window.h defines.h
|
2013-05-01 02:00:16 -04:00
|
|
|
wrapper.o: wrapper.c wrapper.h
|
2015-03-17 05:14:43 -04:00
|
|
|
wscreen.o: wscreen.c wscreen.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
|