1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-22 09:06:38 -05:00

Simplify Makefile by removing obsolete rules (lint, splint, sparse, tags).

This commit is contained in:
Renaud 2021-08-07 10:28:20 +08:00
parent 4b45ca231e
commit 3551d2b8d1
2 changed files with 7 additions and 39 deletions

4
.gitignore vendored
View File

@ -1,2 +1,4 @@
em depend.mak
ue
*.o *.o
*.exe

View File

@ -1,5 +1,5 @@
# Makefile -- uEMACS # Makefile -- µEMACS
# Copyright (c) 2014-2021 Renaud Fivet # Copyright © 2013-2021 Renaud Fivet
# Make the build silent by default # Make the build silent by default
V = V =
@ -25,7 +25,7 @@ WARNINGS=-pedantic -Wall -Wextra -Wstrict-prototypes -Wno-unused-parameter
CFLAGS=-O2 $(WARNINGS) CFLAGS=-O2 $(WARNINGS)
LDFLAGS=-s LDFLAGS=-s
LIBS=-lcurses LIBS=-lcurses
DEFINES=-DAUTOCONF -DPROGRAM=$(PROGRAM) DEFINES=-DAUTOCONF -DPROGRAM=$(PROGRAM) # -DNDEBUG
ifeq ($(uname_S),Linux) ifeq ($(uname_S),Linux)
DEFINES += -DPOSIX -DUSG DEFINES += -DPOSIX -DUSG
else ifeq ($(uname_S),CYGWIN) else ifeq ($(uname_S),CYGWIN)
@ -38,18 +38,6 @@ else
$(error $(uname_S) needs configuration) $(error $(uname_S) needs configuration)
endif 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
#LIBS=-ltermcap # BSD
#LIBS=-lcurses # SYSV
#LIBS=-ltermlib
#LIBS=-L/usr/lib/termcap -ltermcap
LFLAGS=-hbx
BINDIR=/usr/bin BINDIR=/usr/bin
LIBDIR=/usr/lib LIBDIR=/usr/lib
@ -60,15 +48,9 @@ $(PROGRAM): $(OBJS)
$(E) " LINK " $@ $(E) " LINK " $@
$(Q) $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(Q) $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
SPARSE=sparse
SPARSE_FLAGS=-D__LITTLE_ENDIAN__ -D__x86_64__ -D__linux__ -D__unix__
sparse:
$(SPARSE) $(SPARSE_FLAGS) $(DEFINES) $(SRCS)
clean: clean:
$(E) " CLEAN" $(E) " CLEAN"
$(Q) rm -f $(PROGRAM) core lintout makeout tags *.o $(Q) rm -f $(PROGRAM) depend.mak *.o
install: $(PROGRAM) install: $(PROGRAM)
strip $(PROGRAM) strip $(PROGRAM)
@ -78,22 +60,6 @@ install: $(PROGRAM)
chmod 755 ${BINDIR}/$(PROGRAM) chmod 755 ${BINDIR}/$(PROGRAM)
chmod 644 ${LIBDIR}/emacs.hlp ${LIBDIR}/.emacsrc chmod 644 ${LIBDIR}/emacs.hlp ${LIBDIR}/.emacsrc
lint: ${SRC}
@rm -f lintout
lint ${LFLAGS} ${SRC} >lintout
cat lintout
splint:
splint -weak $(DEFINES) $(SRCS) -booltype boolean -booltrue TRUE -boolfalse FALSE +posixlib +matchanyintegral
errs:
@rm -f makeout
make $(PROGRAM) >makeout 2>&1
tags: ${SRC}
@rm -f tags
ctags ${SRC}
.c.o: .c.o:
$(E) " CC " $@ $(E) " CC " $@
$(Q) ${CC} ${CFLAGS} ${DEFINES} -c $*.c $(Q) ${CC} ${CFLAGS} ${DEFINES} -c $*.c