112 lines
1.8 KiB
Plaintext
112 lines
1.8 KiB
Plaintext
#
|
|
#
|
|
|
|
default:: all
|
|
|
|
#SHELL=/bin/sh
|
|
|
|
LDLIBS+=$(MPLIB1_LINK)
|
|
|
|
ifndef DOING_CLEAN
|
|
include ../make_platform
|
|
include ../make_site
|
|
endif
|
|
|
|
ifndef MAJOR_VERSION
|
|
MAJOR_VERSION=5
|
|
endif
|
|
ifndef MINOR_VERSION
|
|
MINOR_VERSION=0
|
|
endif
|
|
ifndef MAJMIN_VERSION
|
|
MAJMIN_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
|
|
endif
|
|
|
|
ifndef LIBDIR
|
|
LIBDIR=../lib
|
|
endif
|
|
ifndef LIBINC_DIR
|
|
LIBINC_DIR=..
|
|
endif
|
|
ifndef BIN_DIR
|
|
BIN_DIR=../bin
|
|
endif
|
|
ifndef INSTALL_DIR
|
|
INSTALL_DIR=/usr/local
|
|
endif
|
|
ifndef INSTALL_LIB
|
|
INSTALL_LIB=/usr/local/lib
|
|
endif
|
|
ifndef INSTALL_INCLUDE
|
|
INSTALL_INCLUDE=/usr/local/include/mplib1
|
|
endif
|
|
ifndef INSTALL_BIN
|
|
INSTALL_BIN=/usr/local/bin
|
|
endif
|
|
|
|
ifdef GDBM_DIR
|
|
ifndef GDBM_INC_DIR
|
|
GDBM_INC_DIR=$(GDBM_DIR)
|
|
endif
|
|
ifndef GDBM_LIB_DIR
|
|
GDBM_LIB_DIR=$(GDBM_DIR)
|
|
endif
|
|
endif
|
|
|
|
ifdef GDBM_INC_DIR
|
|
CFLAGS+=-I$(GDBM_INC_DIR)
|
|
else
|
|
GDBM_INC_DIR=.
|
|
endif
|
|
ifdef GDBM_LIB_DIR
|
|
LDLIBS+=-L$(GDBM_LIB_DIR)
|
|
else
|
|
GDBM_LIB_DIR=.
|
|
endif
|
|
|
|
MPLIB1_LINK= -L$(LIBDIR) -lmplib1
|
|
|
|
MPLIB1BPO_LINK= -L$(LIBDIR) -lmplib1bpo
|
|
|
|
MPLIB1GDBM_LINK= -L$(LIBDIR) -lmplib1gdbm
|
|
|
|
|
|
vpath %.h $(LIBINC_DIR) ../include
|
|
|
|
vpath %.o OBJECTS
|
|
vpath %.d DEPENDS
|
|
|
|
ifndef DEPFLAGS
|
|
DEPFLAGS=-M
|
|
endif
|
|
|
|
|
|
ifndef DEPENDRULE
|
|
%.d: %.c
|
|
$(SHELL) -ec '$(CC) $(DEPFLAGS) $(CPPFLAGS) \
|
|
-I $(LIBINC_DIR) -I ../include -I$(GDBM_INC_DIR) $< \
|
|
| sed '\''s/$*\\.o[ :]*/& $@/g'\'' > $@'
|
|
|
|
DEPENDS/%.d: %.c
|
|
$(SHELL) -ec '$(CC) $(DEPFLAGS) $(CPPFLAGS) \
|
|
-I $(LIBINC_DIR) -I ../include -I$(GDBM_INC_DIR) $< \
|
|
| sed '\''s#$*\\.o[ :]*#& $@#g'\'' > $@'
|
|
|
|
DEPENDRULE=DEFINED
|
|
endif
|
|
|
|
ifeq ($(CC),gcc)
|
|
CFLAGS += -Wall -Wcast-qual -Wcast-align -Wwrite-strings \
|
|
-Wconversion -Waggregate-return -Wstrict-prototypes \
|
|
-Wmissing-prototypes -Wmissing-declarations \
|
|
-Wnested-externs -fPIC
|
|
else
|
|
ifdef NCR3000
|
|
CFLAGS += -Hnocopyr -K PIC
|
|
endif
|
|
endif
|
|
|
|
CFLAGS += -I $(LIBINC_DIR) -DSTRICT
|
|
|
|
|