diff options
| author | Simon Tatham <anakin@pobox.com> | 1999-01-30 21:35:36 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 1999-01-30 21:35:36 +0000 |
| commit | f91811f57de0561cc7c8efb5897a6b62f5c0e0b2 (patch) | |
| tree | 0f942e70bd4936e5806874193d17ba90693cd313 /Makefile | |
| download | halibut-f91811f57de0561cc7c8efb5897a6b62f5c0e0b2.zip halibut-f91811f57de0561cc7c8efb5897a6b62f5c0e0b2.tar.gz halibut-f91811f57de0561cc7c8efb5897a6b62f5c0e0b2.tar.bz2 halibut-f91811f57de0561cc7c8efb5897a6b62f5c0e0b2.tar.xz | |
Initial checkin of skeleton application. About to start reading files
[originally from svn r22]
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..23eb91e --- /dev/null +++ b/Makefile @@ -0,0 +1,55 @@ +# Buttress master makefile + +# Requires a compiler with -MD support, currently + +# `make' from top level will build in buttress.b +# `make BUILDDIR=foo' from top level will build in directory foo +ifndef REALBUILD +ifndef BUILDDIR +BUILDDIR := build +endif +all: + @test -d $(BUILDDIR) || mkdir $(BUILDDIR) + @make -C $(BUILDDIR) -f ../Makefile REALBUILD=yes +else + +# The `real' makefile part. + +ifdef RELEASE +ifndef VERSION +VERSION := $(RELEASE) +endif +else +CFLAGS += -g +endif + +ifndef VER +ifdef VERSION +VER := $(VERSION) +endif +endif +ifdef VER +VDEF := -DVERSION=\"$(VER)\" +endif + +SRC := ../ + +MODULES := main malloc error help licence version + +OBJECTS := $(addsuffix .o,$(MODULES)) +DEPS := $(addsuffix .d,$(MODULES)) + +buttress: $(OBJECTS) + $(CC) $(LFLAGS) -o buttress $(OBJECTS) + +%.o: $(SRC)%.c + $(CC) $(CFLAGS) -MD -c $< + +version.o: FORCE + $(CC) $(VDEF) -MD -c $(SRC)version.c + +FORCE: # phony target to force version.o to be rebuilt every time + +-include $(DEPS) + +endif |