Update of /cvsroot/ro-oslib/OSLib/!OsLib/Tools/DefMod2/defmod/Build_GNU
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/Tools/DefMod2/defmod/Build_GNU
Added Files:
.cvsignore GNUmakefile
Log Message:
merged Unix-Build back into trunk (20040503-1)
--- NEW FILE: .cvsignore ---
defmod
.directory
defmod.c
--- NEW FILE: GNUmakefile ---
#
# Makefile for defmod for UNIX.
#
#------------------------------------------------------------------------
#target-specific macros
TRACE ?= 0
BINDIR ?= ../../../../Bin
TARGET = defmod
MODULES = \
${TARGET} \
asmhelp \
cheader \
chelp \
cstrong \
def \
hdr \
objasm
# modules from support
SUPPORTMODULES= \
kernel \
lookup \
os \
osfile \
osfind \
realloc \
unix \
x
# modules required if tracing
TRACEMODULES = \
trace \
m \
osargs \
osgbpb
INCLUDES = -I. -I../sources -I../../.. -I../../../support
DEFINES = -DUNIX -DEXECUTE_ON_UNIX -D${ASMCMD} -D__swi
VPATH = ../sources ../../../support ../../../oslib/unix
SUPPORTOBJS = $(patsubst %,%.o,${SUPPORTMODULES})
TRACEOBJS = $(patsubst %,%.o,${TRACEMODULES})
TARGETOBJS = $(patsubst %,%.o,${MODULES})
OBJS = ${TARGETOBJS} ${SUPPORTOBJS}
ifneq (${TRACE},0)
OBJS += ${TRACEOBJS}
endif
#define which assembler DefMod should use
# USE_GCC for GCC
# USE_ARMASM for PACE/solaris
# USE_OBJASM for RISC OS
ASMCMD = USE_GCC
#------------------------------------------------------------------------
# tools
CC = gcc
CFLAGS = -Wall -funsigned-char
LD = gcc
LDFLAGS =
YACC = bison
YFLAGS =
CP = cp -f
#------------------------------------------------------------------------
#targets
.PHONY: all clean realclean
all: ${TARGET}
${TARGET}: ${OBJS} defmod.c
${LD} ${LDFLAGS} -o $@ ${OBJS}
if [ ! -d ${BINDIR} ]; then mkdir ${BINDIR}; fi
${CP} $@ ${BINDIR}/
support:
clean: ;rm -f ${TARGETOBJS} ${SUPPORTOBJS} ${TRACEOBJS} ${TARGET} ${TARGET}.c
realclean: clean
find . -type l -exec rm -f {} \;
#------------------------------------------------------------------------
# general rules:
.SUFFIXES:
.SUFFIXES: .o .c .y
.c.o: ;${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -DTRACE=${TRACE} -o $@ -c $<
.y.c: ;${YACC} -y -o $@ $<
|