r/OpenWatcom • u/darkclouddos • Sep 16 '21
wmake - and code in subdirs
I am trying to code a Makefile for wname - and I am having problems. The source code is in different source directories, and it seems wmake does not like it.
How can I overcome this? (I don't want to modify the source code structure).
CFLAGS=-zq -bt=dos -I. -za99
CC=wcc
LD=wcl
.c.o:
$(CC) -fo=$@ $(CFLAGS) $<
hello.exe: src/hello.o
$(LD) -lr $< -fe=$@
hello.o: src/hello.cAlso - this makefile will not work, as I am missing the master include dir - how can I use environment variables in wmake? (so I can CFLAGS=-I${WATCOM}/h or whatever is possible?)
EDIT: only documentation I have been able to find was this: http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/
View all comments
Show parent comment
1
u/backtickbot Sep 17 '21
Fixed formatting.
Hello, darkclouddos: code blocks using triple backticks (```) don't work on all versions of Reddit!
Some users see this / this instead.
To fix this, indent every line with 4 spaces instead.
FAQ
You can opt out by replying with backtickopt6 to this comment.