Makefile

Sun, 21 May 2000 17:33:48 +0200

author
tuomov
date
Sun, 21 May 2000 17:33:48 +0200
changeset 12
5fd153b29d40
parent 10
ab335fe0d26d
child 16
f597c8f0bcc9
permissions
-rw-r--r--

trunk: changeset 15
- Optparser generates --help from option descriptions in the
OptParserOpt structure

- Changed the options --license, --authors and --proginfo to single
--about

##
## libtu Makefile
##

# System-specific configuration is in system.mk
include system.mk

######################################

INCLUDES += -I./include
CFLAGS += $(ANSI_SOURCE)

OBJS= misc.o output.o util.o optparser.o parser.o tokenizer.o

LIBDIR=$(PREFIX)/lib
INCDIR=$(PREFIX)/include/libtu

TARGETS=libtu.a
TESTERS=tester tester2 tester3

######################################

include rules.mk

######################################

testers: $(TESTERS)

libtu.a: $(OBJS)
	$(AR) $(ARFLAGS) $@ $+

tester: tester.c libtu.a
	$(CC) $(CFLAGS) $< -L. -ltu -lm -o $@

tester2: tester2.c libtu.a
	$(CC) $(CFLAGS) $< -L. -ltu -lm -o $@

tester3: tester3.c libtu.a
	$(CC) $(CFLAGS) $< -L. -ltu -lm -o $@

_install:
	$(INSTALL) -d $(LIBDIR)
	$(INSTALL) -d $(INCDIR)
	$(INSTALL) -m $(DATA_MODE) libtu.a $(LIBDIR)
	for i in include/libtu/*.h; do \
		$(INSTALL) -m $(DATA_MODE) $$i $(INCDIR); \
	done

mercurial