mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
Minor improvements in modules testing Makefile
* modules/mod-test/Makefile (EMACS, SO): New variables. (CFLAGS): When SO = dll, don't use -fPIC. (check): New target, runs the test.
This commit is contained in:
parent
d4869dde91
commit
7cd728c813
1 changed files with 16 additions and 4 deletions
|
|
@ -18,16 +18,28 @@
|
|||
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
ROOT = ../..
|
||||
EMACS = $(ROOT)/src/emacs
|
||||
|
||||
CC = gcc
|
||||
LD = gcc
|
||||
CFLAGS = -ggdb3 -Wall
|
||||
LDFLAGS =
|
||||
|
||||
all: mod-test.so
|
||||
# On MS-Windows, say "make SO=.dll" to build the module
|
||||
SO = so
|
||||
# -fPIC is a no-op on Windows, but causes a compiler warning
|
||||
ifeq ($(SO),dll)
|
||||
CFLAGS = -ggdb3 -Wall
|
||||
else
|
||||
CFLAGS = -ggdb3 -Wall -fPIC
|
||||
endif
|
||||
|
||||
%.so: %.o
|
||||
all: mod-test.$(SO)
|
||||
|
||||
%.$(SO): %.o
|
||||
$(LD) -shared $(LDFLAGS) -o $@ $<
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -I$(ROOT)/src -fPIC -c $<
|
||||
$(CC) $(CFLAGS) -I$(ROOT)/src -c $<
|
||||
|
||||
check:
|
||||
$(EMACS) -batch -l ert -l test.el -f ert-run-tests-batch-and-exit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue