1 # Halibut master makefile
3 # Requires a compiler with -MD support, currently
5 # `make' from top level will build in directory `build'
6 # `make BUILDDIR=foo' from top level will build in directory foo
16 @
test -d
$(BUILDDIR
) || mkdir
$(BUILDDIR
)
17 @make
-C
$(BUILDDIR
) -f ..
/Makefile REALBUILD
=yes
19 @
test -d
$(BUILDDIR
) || mkdir
$(BUILDDIR
)
20 @make
-C
$(BUILDDIR
) -f ..
/Makefile spotless REALBUILD
=yes
22 @
test -d
$(BUILDDIR
) || mkdir
$(BUILDDIR
)
23 @make
-C
$(BUILDDIR
) -f ..
/Makefile
clean REALBUILD
=yes
25 # Remove Halibut output files in the source directory (may
26 # have been created by running, for example, `build/halibut
31 # The `real' makefile part.
54 VDEF
:= -DVERSION
=\"$(VER
)\"
59 MODULES
:= main malloc ustring error help licence version misc tree234
60 MODULES
+= input keywords contents index style biblio
61 MODULES
+= bk_text bk_xhtml bk_whlp bk_man
64 OBJECTS
:= $(addsuffix .o
,$(MODULES
))
65 DEPS
:= $(addsuffix .d
,$(MODULES
))
68 $(CC
) $(LFLAGS
) -o halibut
$(OBJECTS
) $(LIBS
)
71 $(CC
) $(CFLAGS
) -MD
-c
$<
74 $(CC
) $(VDEF
) -MD
-c
$(SRC
)version.c
80 rm -f
*.o halibut core
82 FORCE
: # phony target to force version.o to be rebuilt every time