1 # @(#) rlsMakefile 97/12/10 1.1
3 # Portable Forth written in 'C'
8 # Options include: PF_SUPPORT_FP PF_NO_MALLOC PF_NO_INIT PF_DEBUG
9 # See "docs/pf_ref.htm" file for more info.
13 EMBOBJECTDIR = embobjects
20 -fno-keep-inline-functions \
26 -Wmissing-prototypes \
27 -Wmissing-declarations
29 CCOPTS = -DPF_SUPPORT_FP $(FULL_WARNINGS)
32 EMBCCOPTS = -DPF_NO_INIT -DPF_NO_MALLOC -DPF_NO_FILEIO \
33 -DPF_NO_CLIB -DPF_STATIC_DIC
35 #######################################
36 # Build file lists from wildcards.
37 PFITEMP = ${wildcard ${SOURCEDIR}/*.h}
38 PFINCLUDES = ${PFITEMP:${SOURCEDIR}/pfdicdat.h=}
39 PFSOURCE = ${wildcard ${SOURCEDIR}/*.c}
40 PFTEMP = ${PFSOURCE:%.c=%.o}
41 PFOBJS = ${PFTEMP:${SOURCEDIR}/%=${OBJECTDIR}/%}
42 PFEMBOBJS = ${PFTEMP:${SOURCEDIR}/%=${EMBOBJECTDIR}/%}
44 COMPILE = $(COMPILER) $(CCOPTS) $(CDEFS)
46 ${OBJECTDIR}/%.o: $(PFINCLUDES) ${SOURCEDIR}/%.c
47 $(COMPILE) -O -o ${OBJECTDIR}/$*.o -c ${SOURCEDIR}/$*.c
49 ${EMBOBJECTDIR}/%.o: $(PFINCLUDES) ${SOURCEDIR}/%.c ${SOURCEDIR}/pfdicdat.h
50 $(COMPILE) -O -o ${EMBOBJECTDIR}/$*.o -c ${SOURCEDIR}/$*.c $(EMBCCOPTS)
52 all: pforth pforth.dic
55 echo "ITEMP FILES -----------------"
57 echo "INCLUDE FILES -----------------"
59 echo "'C' FILES ---------------------"
61 echo "OBJECT FILES ------------------"
63 echo "EMBEDDED OBJECT FILES ------------------"
66 # build pforth by compiling 'C' source
67 pforth: $(PFINCLUDES) $(PFOBJS)
68 $(COMPILER) $(PFOBJS) -lm -o pforth
70 # build basic dictionary by running newly built pforth and including system.fth
74 ${SOURCEDIR}/pfdicdat.h: pforth pforth.dic
75 @(echo 'INCLUDE utils/savedicd.fth'; \
79 cp pfdicdat.h ${SOURCEDIR}
82 pfemb: $(PFINCLUDES) $(PFEMBOBJS)
83 $(COMPILER) $(PFEMBOBJS) -lm -o pfemb
86 rm -f $(PFOBJS) $(PFEMBOBJS) pforth *.dic core ${SOURCEDIR}/pfdicdat.h pfemb