Commit 7cd728c8 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

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.
parent d4869dde
......@@ -18,16 +18,28 @@
# along with GNU Emacs. If not, see <>.
ROOT = ../..
EMACS = $(ROOT)/src/emacs
CC = gcc
LD = gcc
CFLAGS = -ggdb3 -Wall
# 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
CFLAGS = -ggdb3 -Wall -fPIC
all: mod-test.$(SO) %.o
%.$(SO): %.o
$(LD) -shared $(LDFLAGS) -o $@ $<
%.o: %.c
$(CC) $(CFLAGS) -I$(ROOT)/src -fPIC -c $<
$(CC) $(CFLAGS) -I$(ROOT)/src -c $<
$(EMACS) -batch -l ert -l test.el -f ert-run-tests-batch-and-exit
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment