Mercurial > ~dholland > hg > ag > index.cgi
view mk/prog.mk @ 8:ec2b657edf13
Add explicit lint-comment-style fallthrough annotations.
GCC now assumes that if you don't have these you're making a mistake,
which is annoying.
XXX: This changeset updates the AG output files only (by hand) and is
XXX: abusive - rebuilding them will erase the change. However, I need
XXX: to get things to build before I can try to get AG to issue the
XXX: annotations itself, so this seems like a reasonable expedient.
author | David A. Holland |
---|---|
date | Mon, 30 May 2022 23:51:43 -0400 |
parents | 13d2b8934445 |
children | bb115deb6fb2 |
line wrap: on
line source
# # prog.mk - compile a program, in portable make. # # Before including, set: # PROG program to build # SRCS sources # RCFILES (optional) Windows resource files # SYNS (optional) AG syntax files # SYNOUTPUTEXT (optional) output suffix for AG files # AGFILEDEST (optional) destination for AG files ("here" or "srcdir") # SYNOUTPUTEXT?=.cpp AGFILEDEST?=srcdir include $(BUILDTOP)/config.mk # beforeall used by: agfile-rules.sh when AGFILEDEST==here # afterall used by: none all: beforeall doall afterall beforeall doall afterall:; # BSD make has .WAIT to make beforeall/afterall work, but gmake doesn't. .NOTPARALLEL: doall: $(PROG)$(EXEEXT) TYPE=PROG include rules.mk include depend.mk $(PROG)$(EXEEXT): $(OBJS) $(RESFILES) $(MYLIBS) @echo ' [DEP]' @$(MKDEP) @echo ' [LINK] $@' @$(LDCC) $(LDFLAGS) $(OBJS) $(RESFILES) $(MYLIBS) $(LIBS) -o $@ rules: @$(TOP)/mk/include-defs.sh '$(INCDIRS)' > rules.mk @$(TOP)/mk/compile-rules.sh '$(SRCS)' '$(RCFILES)' >> rules.mk @$(TOP)/mk/agfile-rules.sh $(AGFILEDEST) '$(SYNS)' '$(SYNOUTPUTEXT)' \ >> rules.mk # @echo ' [RULES]' depend: @echo ' [DEP]' @$(MKDEP) clean: @echo ' [RM] $(PROG)$(EXEEXT) $(CLEANFILES) *~' @rm -f $(PROG)$(EXEEXT) $(CLEANFILES) *~ distclean: clean @echo ' [RM] $(DISTCLEANFILES) *~' @rm -f $(DISTCLEANFILES) *~ .PHONY: all rules depend clean distclean