aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/mod-test/Makefile20
1 files changed, 16 insertions, 4 deletions
diff --git a/modules/mod-test/Makefile b/modules/mod-test/Makefile
index 654c22a7e33..79a88725d08 100644
--- a/modules/mod-test/Makefile
+++ b/modules/mod-test/Makefile
@@ -18,16 +18,28 @@
18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19 19
20ROOT = ../.. 20ROOT = ../..
21EMACS = $(ROOT)/src/emacs
21 22
22CC = gcc 23CC = gcc
23LD = gcc 24LD = gcc
24CFLAGS = -ggdb3 -Wall
25LDFLAGS = 25LDFLAGS =
26 26
27all: mod-test.so 27# On MS-Windows, say "make SO=.dll" to build the module
28SO = so
29# -fPIC is a no-op on Windows, but causes a compiler warning
30ifeq ($(SO),dll)
31CFLAGS = -ggdb3 -Wall
32else
33CFLAGS = -ggdb3 -Wall -fPIC
34endif
35
36all: mod-test.$(SO)
28 37
29%.so: %.o 38%.$(SO): %.o
30 $(LD) -shared $(LDFLAGS) -o $@ $< 39 $(LD) -shared $(LDFLAGS) -o $@ $<
31 40
32%.o: %.c 41%.o: %.c
33 $(CC) $(CFLAGS) -I$(ROOT)/src -fPIC -c $< 42 $(CC) $(CFLAGS) -I$(ROOT)/src -c $<
43
44check:
45 $(EMACS) -batch -l ert -l test.el -f ert-run-tests-batch-and-exit