1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-11-14 00:26:01 -05:00
uemacs/Makefile

171 lines
5.1 KiB
Makefile
Raw Normal View History

# makefile for emacs, updated Sun Apr 28 17:59:07 EET DST 1996
# Make the build silent by default
V =
ifeq ($(strip $(V)),)
E = @echo
Q = @
else
E = @\#
Q =
endif
export E Q
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
2013-05-16 21:21:59 -04:00
PROGRAM=ue
2013-05-01 00:21:08 -04:00
SRC=basic.c bind.c buffer.c crypt.c display.c eval.c exec.c \
file.c fileio.c input.c isearch.c line.c lock.c main.c \
pklock.c posix.c random.c region.c search.c spawn.c tcap.c \
termio.c window.c word.c names.c globals.c \
2013-05-01 02:00:16 -04:00
wrapper.c utf8.c
2013-05-01 00:21:08 -04:00
OBJ=basic.o bind.o buffer.o crypt.o display.o eval.o exec.o \
file.o fileio.o input.o isearch.o line.o lock.o main.o \
pklock.o posix.o random.o region.o search.o spawn.o tcap.o \
termio.o window.o word.o names.o globals.o \
2013-05-01 02:00:16 -04:00
wrapper.o utf8.o
HDR=basic.h bind.h buffer.h crypt.h display.h ebind.h edef.h efunc.h \
estruct.h eval.h exec.h file.h fileio.h input.h isearch.h line.h \
lock.h main.h pklock.h random.h region.h search.h spawn.h \
termio.h utf8.h version.h window.h word.h wrapper.h
# DO NOT ADD OR MODIFY ANY LINES ABOVE THIS -- make source creates them
CC=gcc
WARNINGS=-Wall -Wstrict-prototypes
CFLAGS=-O2 $(WARNINGS)
#CC=c89 +O3 # HP
#CFLAGS= -D_HPUX_SOURCE -DSYSV
#CFLAGS=-O4 -DSVR4 # Sun
#CFLAGS=-O -qchars=signed # RS/6000
ifeq ($(uname_S),Linux)
DEFINES=-DAUTOCONF -DPOSIX -DUSG -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE=600
endif
ifeq ($(uname_S),FreeBSD)
DEFINES=-DAUTOCONF -DPOSIX -DSYSV -D_FREEBSD_C_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE=600
endif
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)
DEFINES=-DAUTOCONF -DCYGWIN
2013-04-30 03:24:03 -04:00
endif
#DEFINES=-DAUTOCONF
#LIBS=-ltermcap # BSD
LIBS=-lcurses # SYSV
#LIBS=-ltermlib
#LIBS=-L/usr/lib/termcap -ltermcap
LFLAGS=-hbx
BINDIR=/usr/bin
LIBDIR=/usr/lib
$(PROGRAM): $(OBJ)
$(E) " LINK " $@
$(Q) $(CC) $(LDFLAGS) $(DEFINES) -o $@ $(OBJ) $(LIBS)
SPARSE=sparse
SPARSE_FLAGS=-D__LITTLE_ENDIAN__ -D__x86_64__ -D__linux__ -D__unix__
sparse:
$(SPARSE) $(SPARSE_FLAGS) $(DEFINES) $(SRC)
clean:
$(E) " CLEAN"
$(Q) rm -f $(PROGRAM) core lintout makeout tags makefile.bak *.o
install: $(PROGRAM)
strip $(PROGRAM)
2013-05-16 21:21:59 -04:00
cp $(PROGRAM) ${BINDIR}
cp emacs.hlp ${LIBDIR}
cp emacs.rc ${LIBDIR}/.emacsrc
2013-05-16 21:21:59 -04:00
chmod 755 ${BINDIR}/$(PROGRAM)
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
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\
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
@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
.c.o:
$(E) " CC " $@
$(Q) ${CC} ${CFLAGS} ${DEFINES} -c $*.c
# DO NOT DELETE THIS LINE -- make depend uses it
ansi.o: ansi.c estruct.h edef.h
2013-05-18 20:13:48 -04:00
basic.o: basic.c basic.h estruct.h edef.h
bind.o: bind.c bind.h estruct.h edef.h fileio.h
buffer.o: buffer.c buffer.h estruct.h edef.h
crypt.o: crypt.c crypt.h display.h estruct.h edef.h input.h
display.o: display.c display.h estruct.h edef.h utf8.h version.h window.h
eval.o: eval.c eval.h estruct.h edef.h version.h fileio.h
exec.o: exec.c exec.h estruct.h edef.h
2013-05-19 05:36:24 -04:00
file.o: file.c file.h crypt.h estruct.h edef.h fileio.h
fileio.o: fileio.c fileio.h crypt.h display.h estruct.h edef.h
ibmpc.o: ibmpc.c estruct.h edef.h
input.o: input.c input.h estruct.h edef.h
isearch.o: isearch.c isearch.h estruct.h edef.h
line.o: line.c line.h estruct.h edef.h
lock.o: lock.c lock.h estruct.h edef.h
2013-05-28 05:40:01 -04:00
main.o: main.c main.h estruct.h crypt.h edef.h ebind.h version.h
names.o: names.c estruct.h crypt.h edef.h line.h
pklock.o: pklock.c pklock.h estruct.h
posix.o: posix.c termio.h estruct.h utf8.h
random.o: random.c random.h estruct.h edef.h
region.o: region.c region.h estruct.h edef.h
search.o: search.c search.h estruct.h edef.h
spawn.o: spawn.c spawn.h estruct.h edef.h
tcap.o: tcap.c estruct.h edef.h
termio.o: termio.c termio.h estruct.h edef.h
utf8.o: utf8.c utf8.h
vmsvt.o: vmsvt.c estruct.h edef.h
vt52.o: vt52.c estruct.h edef.h
2013-05-18 20:13:48 -04:00
window.o: window.c window.h estruct.h edef.h basic.h display.h main.h line.h wrapper.h
word.o: word.c word.h estruct.h edef.h
2013-05-01 02:00:16 -04:00
wrapper.o: wrapper.c wrapper.h
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above