OSSP CVS Repository

ossp - ossp-pkg/act/Makefile.in 1.4
Not logged in
[Honeypot]  [Browse]  [Directory]  [Home]  [Login
[Reports]  [Search]  [Ticket]  [Timeline
  [Raw

ossp-pkg/act/Makefile.in 1.4
##
##  ACT Makefile
##

CC      = @CC@
CFLAGS  = @CFLAGS@
LDFLAGS = @LDFLAGS@
AR      = @AR@
RANLIB  = @RANLIB@
RM      = rm -f
SHTOOL  = ./shtool
SED     = sed

PRE     = act_p.h
LIB     = libact.a
SRC     = act_mem.c act_ctx.c act_str.c act_lib.c act_hash.c act_hash_fct.c act_hash_oh.c act_hash_lh.c 
OBJ     = act_mem.o act_ctx.o act_str.o act_lib.o act_hash.o act_hash_fct.o act_hash_oh.o act_hash_lh.o 
TST     = act_test

_VERSION_FILE = \
	$(S)act_vers.c

_VERSION = \
	$(SHTOOL) version -l c -n 'Act' -p act_int_ $$OPT $(_VERSION_FILE);\
	V=`$(SHTOOL) version -l c -d long $(_VERSION_FILE)`;\
	$(SED) -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README

all: $(PRE) $(LIB) $(TST)

.c.o:
	$(CC) $(CFLAGS) -c $<

$(PRE): $(PRE).in
	$(SHTOOL) scpp -o $(PRE) -t $(PRE).in -Dcpp -Cintern -M '==#==' $(SRC)

$(LIB): $(OBJ)
	$(AR) rc $(LIB) $(OBJ)
	$(RANLIB) $(LIB)

$(TST): $(TST).o $(LIB)
	$(CC) $(LDFLAGS) -o $(TST) $(TST).o $(LIB)

test-hash-fct:
	$(CC) -DACT_TEST -oact_hash_fct act_hash_fct.c -lm
	./act_hash_fct

#   increase or update version information
new-version:
	@V="$(VERSION)"; \
	if [ ".$$V" != . ]; then \
		OPT="-s$$V"; \
	else \
		OPT="-e"; \
	fi; \
	$(_VERSION)
update-version:
	OPT="-s`$(SHTOOL) version -lc -dshort $(_VERSION_FILE)`" && $(_VERSION)

clean:
	$(RM) $(PRE)
	$(RM) $(LIB)
	$(RM) $(OBJ)
	$(RM) $(TST).o $(TST)
	$(RM) core *.core *.aux *.log
	$(RM) act_hash_fct

distclean:
	@$(MAKE) $(MFLAGS) clean
	$(RM) config.log config.cache config.status
	$(RM) act_cfg.h act_p.h act.h
	$(RM) Makefile

check: test
test:
	time ./act_test


CVSTrac 2.0.1