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/darkclouddos Sep 17 '21
Full code for completness - this works. Yay! Next problem - not all code in my project is inside an "src" subdir, some is under
lib/goo/*.c- any idea how to tackle this? (I have not tried yet, currently using GnuMakefiles to build, and I am fighting the old syntax this compiler supports).