1 # Halibut master makefile
3 # Currently depends on gcc, because:
4 # - the dependency tracking uses -MD in order to avoid needing an
5 # explicit `make depend' step
6 # - the definition of CFLAGS includes the gcc-specific flag
9 # Currently depends on GNU make, because:
10 # - the Makefile uses GNU ifdef / ifndef commands and GNU make `%'
13 # `make' from top level will build in directory `build'
14 # `make BUILDDIR=foo' from top level will build in directory foo
24 @
test -d
$(BUILDDIR
) || mkdir
$(BUILDDIR
)
25 @make
-C
$(BUILDDIR
) -f ..
/Makefile REALBUILD
=yes
27 @
test -d
$(BUILDDIR
) || mkdir
$(BUILDDIR
)
28 @make
-C
$(BUILDDIR
) -f ..
/Makefile spotless REALBUILD
=yes
30 @
test -d
$(BUILDDIR
) || mkdir
$(BUILDDIR
)
31 @make
-C
$(BUILDDIR
) -f ..
/Makefile
clean REALBUILD
=yes
33 # Remove Halibut output files in the source directory (may
34 # have been created by running, for example, `build/halibut
39 # The `real' makefile part.
62 VDEF
:= -DVERSION
=\"$(VER
)\"
67 MODULES
:= main malloc ustring error help licence version misc tree234
68 MODULES
+= input keywords contents index style biblio
69 MODULES
+= bk_text bk_xhtml bk_whlp bk_man
72 OBJECTS
:= $(addsuffix .o
,$(MODULES
))
73 DEPS
:= $(addsuffix .d
,$(MODULES
))
76 $(CC
) $(LFLAGS
) -o halibut
$(OBJECTS
) $(LIBS
)
79 $(CC
) $(CFLAGS
) -MD
-c
$<
82 $(CC
) $(VDEF
) -MD
-c
$(SRC
)version.c
88 rm -f
*.o halibut core
90 FORCE
: # phony target to force version.o to be rebuilt every time