Makefile: blorb-lib needs hash.h
authorThomas Huth <huth@tuxfamily.org>
Fri, 14 Oct 2022 18:29:41 +0000 (20:29 +0200)
committerThomas Huth <huth@tuxfamily.org>
Fri, 14 Oct 2022 18:29:41 +0000 (20:29 +0200)
If running "make blorb-lib" on a vanilla source directory, the
compilation fails with:

 make -C src/blorb
 make[1]: Entering directory '/home/thomas/src/frotz/src/blorb'
 cc -Wall -std=c99 -O3  -g -D_POSIX_C_SOURCE=200809L -I../common -fPIC
  -fpic -o blorblib.o -c blorblib.c
 In file included from blorblib.c:11:
 ../common/frotz.h:74:10: fatal error: hash.h: No such file or directory
    74 | #include "hash.h"
       |          ^~~~~~~~
 compilation terminated.

Looks like we also have to make sure that hash.h is in place before
compiling the blorb target, thus add the dependency to the Makefile.

Makefile

index 1d27b09ae8d993d60216e6a9c7cf303a4a451b48..3d2bc45c0634a4ccbcade04df44c6048a6bacda0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -461,7 +461,7 @@ $(SDL_LIB): $(COMMON_DEFINES) $(HASH) $(SDL_DIR)
 $(DUMB_LIB): $(COMMON_DEFINES) $(HASH)
        $(MAKE) -C $(DUMB_DIR)
 
-$(BLORB_LIB): $(COMMON_DEFINES)
+$(BLORB_LIB): $(COMMON_DEFINES) $(HASH)
        $(MAKE) -C $(BLORB_DIR)
 
 $(SUB_CLEAN):