2001-10-11 11:07:41 +04:00
|
|
|
# $NetBSD: Makefile.inc,v 1.2 2001/10/11 07:07:41 leo Exp $
|
1996-01-08 01:05:31 +03:00
|
|
|
|
|
|
|
#
|
|
|
|
# Configurable stuff.
|
|
|
|
#
|
|
|
|
CC = cc
|
|
|
|
#CC = gcc
|
|
|
|
CPP = cpp
|
|
|
|
#CPP = gcpp
|
|
|
|
#AS = as
|
|
|
|
AS = gas
|
|
|
|
AR = ar rcs
|
|
|
|
RM = rm -f
|
|
|
|
AWK = awk
|
|
|
|
|
|
|
|
#
|
|
|
|
# Any system specific additional libraries.
|
|
|
|
#
|
|
|
|
#LIBS := ${LIBS} -liio -lport
|
|
|
|
LIBS := ${LIBS} -ltermios
|
|
|
|
|
|
|
|
DEBUG =
|
|
|
|
#DEBUG = -g
|
|
|
|
OPTIM = -O
|
|
|
|
#OPTIM = -O2 -fomit-frame-pointer
|
|
|
|
BASREL =
|
|
|
|
#BASREL = -mpcrel -mbaserel
|
|
|
|
STRIP =
|
|
|
|
#STRIP = -Wl,-s
|
|
|
|
|
|
|
|
# End of configuration section.
|
|
|
|
|
|
|
|
|
|
|
|
HEADERS := ${HEADERS} ../libtos/libtos.h
|
2001-10-11 11:07:41 +04:00
|
|
|
LDADD := ${LDADD} ../libtos/libtos.a -lz
|
1996-01-08 01:05:31 +03:00
|
|
|
INCL := ${INCL} -I. -I../libtos
|
2001-10-11 11:07:41 +04:00
|
|
|
DEFS := ${DEFS} -DTOSTOOLS -DCOMPRESSED_READ
|
1996-01-08 01:05:31 +03:00
|
|
|
|
|
|
|
CFLAGS := ${CFLAGS} -Wall ${DEBUG} ${BASREL} ${OPTIM} ${INCL}
|
|
|
|
LDFLAGS := ${LDFLAGS} ${DEBUG} ${BASREL} ${STRIP}
|
|
|
|
CPPFLAGS:= ${CPPFLAGS} ${DEFS} ${INCL}
|
|
|
|
|
|
|
|
.PHONY: all clean install
|
|
|
|
|
|
|
|
#
|
|
|
|
# Either ${LIB} or ${PROG} is set.
|
|
|
|
#
|
|
|
|
all: ${LIB} ${PROG}
|
|
|
|
|
|
|
|
clean:
|
|
|
|
${RM} ${LIB} ${PROG} ${OBJS} ${CLEAN} a.out core
|
|
|
|
|
|
|
|
install:
|
|
|
|
# @if [ "${PROG}" ]; then \
|
|
|
|
# ...; \
|
|
|
|
# fi
|
|
|
|
|
|
|
|
${OBJS}: ${HEADERS}
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
${CC} ${CFLAGS} ${CPPFLAGS} -o $@ -c $<
|
|
|
|
|
|
|
|
.s.o:
|
2001-10-11 11:07:41 +04:00
|
|
|
${CPP} ${CPPFLAGS} $< | sed -e 's/%//g' | ${AS} ${ASFLAGS} -o $@
|