Simple fix,
--- makefile.orig 2023-06-22 16:41:32.000000000 -0700
+++ makefile 2023-06-22 16:54:14.000000000 -0700
@@ -14,9 +14,9 @@
all : template.exe
-template.exe: $(OBJS)
- gcc -Zomf -Zmap $(OBJS) template.def main.res -o template.exe
- wrc main.res
+template.exe: $(OBJS) template.res
+ gcc -Zomf -Zmap $(OBJS) template.def template.res -o template.exe
+ wrc template.res
main.obj: main.c $(HEADER)
gcc $(CFLAGS) $(DEBUGFLAGS) main.c -o main.obj
@@ -45,8 +45,9 @@
thrd.obj: thrd.c $(HEADERS)
gcc $(CFLAGS) $(DEBUGFLAGS) thrd.c -o thrd.obj
-main.res: main.rc main.ico template.dlg help.rc prodinfo.bmp $(HEADERS)
+template.res: main.rc main.ico template.dlg help.rc prodinfo.bmp $(HEADERS)
wrc -r main.rc
+ mv main.res template.res
clean :
rm -rf *exe *res *obj *lib *.hlp
Perhaps better solution,
--- makefile.orig 2023-06-22 16:41:32.000000000 -0700
+++ makefile 2023-06-22 16:58:54.000000000 -0700
@@ -14,9 +14,9 @@
all : template.exe
-template.exe: $(OBJS)
- gcc -Zomf -Zmap $(OBJS) template.def main.res -o template.exe
- wrc main.res
+template.exe: $(OBJS) template.res
+ gcc -Zomf -Zmap $(OBJS) template.def template.res -o template.exe
+ wrc template.res
main.obj: main.c $(HEADER)
gcc $(CFLAGS) $(DEBUGFLAGS) main.c -o main.obj
@@ -48,5 +48,8 @@
main.res: main.rc main.ico template.dlg help.rc prodinfo.bmp $(HEADERS)
wrc -r main.rc
+template.res: main.res
+ $(shell mv main.res template.res)
+
clean :
rm -rf *exe *res *obj *lib *.hlp
Not sure if mv should have an argument or it could be cp instead, still might need an argument
Edit:fix typo