[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
source file extension
From: |
Duke Normandin |
Subject: |
source file extension |
Date: |
Wed, 20 Oct 2010 16:08:33 -0600 (MDT) |
User-agent: |
Alpine 2.00 (DEB 1167 2008-08-23) |
Hello list...
I recently cobbled together a "generic" Makefile for an Oberon-2
compiler - with the help of 2 generous hackers on this list. Works
great with Oberon.
Today I tried the same Makefile with a Modula-2 compiler, after making
the necessary changes. The Modula compiler is really a gcc
front-end. It behaves pretty much like the Oberon compiler. However,
the Makefile doesn't seem to want to create the object file when used
for the Modula-2 compiler. The Modula-2 source code file extension is
".mod", as opposed to a single-char extension, like .c, or .m . Could
that be the problem? Here's the relevant code:
define assert
$(call assert,$($ARGS), The variable "$ARGS" is null)
endef
# save CLI arguments
EXEC-FILE = $(word 1, $(ARGS))
SRCS = $(wordlist 2, 999, $(ARGS))
LINK = gm2
MODULA = gm2 -c
$(EXEC-FILE): $(SRCS:%.o=%.mod)
# $(LINK) $@ $^
$(LINK) $^ -o $@
%.o:%.mod
$(MODULA) %<
Much obliged!
--
Duke