Mail Archives: djgpp/1997/07/18/15:18:27
Johan Karlsson wrote:
>I have some prblems with my makefiles when using djgpp make.
>When I use them in UNIX they work fine.
>
>First some system info:
>I'm using a PC 486 with msdos 6.2, qemm's dpmi-host
>and dgjpp 2.0
I'm using DJGPP 2.01, and when I remove the $(MAKE1) stuff and start `print'
with `$(MAKE)' everything works fine. I have none of the problems you
mention. Part of the problem is that backslashes in makefiles have to be
doubled to work, so the `subst' broke that. But `make' groks front-slashes
anyway, so I would just use $(MAKE) which has them.
Consider an upgrade to 2.01 and see if your problem goes away.
>makefile
>------------
>SRC = /usr/POLDE/src
>PWD = $(subst \,/,$(subst C:,,$(shell cd)))
>CC = gcc
>CFLAGS += -Wall -O2 -idirafter $(SRC)
>LFLAGS +=
>LIB +=
>MODULE = main
>
>#MAKE fix
>MAKE1 = $(subst /,\,$(MAKE))
>#MAKE1 = $(MAKE)
>
># rules
>all: print
>
>print:
> $(MAKE1) -f print.mk $(MFLAGS) SRCDIR=$(PWD) MODULE=$(MODULE) CC=$(CC)
>LFLAGS="$(LFLAGS)" CFLAGS="$(CFLAGS)" SRC=$(SRC)
>-------------
>
>print.mk
>-------------
>Xprint:
> echo "SRCDIR: $(SRCDIR)"
> echo "SRC: $(SRC)"
> echo "MODULE: $(MODULE)"
> echo "LFLAGS: $(LFLAGS)"
> echo "CFLAGS: $(CFLAGS)"
> echo "CC: $(CC)"
> echo "MFLAGS: $(MFLAGS)"
>-------------
Nate Eldredge
eldredge AT ap DOT net
- Raw text -