Expand PMF_FN_* macros.
[netbsd-mini2440.git] / regress / sys / uvm / pdsim / Makefile
blobad1c67c0432c7a856011961f6cab1f8d879abbc5
1 # $Id: Makefile,v 1.2 2006/10/14 04:59:52 yamt Exp $
3 CPROGS= lirs
4 HPROGS= lfu lru nbsd opt rand
5 HPROGS+= genpat5
6 HPROGS+= renumber
7 PROGS+= linux
9 C_COMPILE= cc -O2 -Wall -Werror
11 all: _mkall
14 # clock-pro
16 CPRO_CFLAGS.useonce= -DUSEONCE
17 CPRO_CFLAGS.listq= -DLISTQ
18 CPRO_CFLAGS.listq_useonce= -DLISTQ -DUSEONCE
19 CPRO_CFLAGS.default=
21 CPRO_CFLAGS.listq_adaptive= -DADAPTIVE -DLISTQ
22 CPRO_CFLAGS.listq_useonce_adaptive= -DADAPTIVE -DLISTQ -DUSEONCE
23 CPRO_CFLAGS.useonce_adaptive= -DADAPTIVE -DUSEONCE
24 CPRO_CFLAGS.adaptive= -DADAPTIVE
26 PDSIM_CPRO_VARIANTS+= default
27 PDSIM_CPRO_VARIANTS+= listq
28 PDSIM_CPRO_VARIANTS+= useonce
29 PDSIM_CPRO_VARIANTS+= listq_useonce
31 PDSIM_CPRO_VARIANTS+= listq_adaptive
32 PDSIM_CPRO_VARIANTS+= useonce_adaptive
33 PDSIM_CPRO_VARIANTS+= listq_useonce_adaptive
34 PDSIM_CPRO_VARIANTS+= adaptive
36 PDSIM_PROGS+= ${PDSIM_CPRO_VARIANTS:S/^/pdsim.cpro_/}
37 PDSIM_PROGS.DBG+= ${PDSIM_CPRO_VARIANTS:S/^/pdsim.dbg.cpro_/}
38 PDPOL= uvm_pdpolicy_clockpro.c
39 SYSSRC= ${NETBSDSRC}/sys
40 .PATH: ${SYSSRC}/uvm
42 .for _V in ${PDSIM_CPRO_VARIANTS}
43 _P=pdsim.cpro_${_V}
44 ${_P}: pdsim.c ${PDPOL}
45 ${C_COMPILE} -I. -I${SYSSRC} -DPDSIM ${CPRO_CFLAGS.${_V}} -o ${.TARGET} ${.ALLSRC}
46 pdsim.dbg.cpro_${_V}: pdsim.c ${PDPOL}
47 ${C_COMPILE} -I. -I${SYSSRC} -DPDSIM -DDEBUG ${CPRO_CFLAGS.${_V}} -o ${.TARGET} ${.ALLSRC}
48 .endfor
51 # clock
53 CLOCK_CFLAGS.defult=
54 CLOCK_CFLAGS.inact90= -DCLOCK_INACTIVEPCT=90
56 PDSIM_CLOCK_VARIANTS+= default
57 PDSIM_CLOCK_VARIANTS+= inact90
59 PDSIM_PROGS+= ${PDSIM_CLOCK_VARIANTS:S/^/pdsim.clock_/}
60 PDSIM_PROGS.DBG+= ${PDSIM_CLOCK_VARIANTS:S/^/pdsim.dbg.clock_/}
61 PDPOL= uvm_pdpolicy_clock.c
62 SYSSRC= /sys
63 .PATH: ${SYSSRC}/uvm
64 .for _V in ${PDSIM_CLOCK_VARIANTS}
65 _P=pdsim.clock_${_V}
66 ${_P}: pdsim.c ${PDPOL}
67 ${C_COMPILE} -I. -I${SYSSRC} -DPDSIM ${CLOCK_CFLAGS.${_V}} -o ${.TARGET} ${.ALLSRC}
68 pdsim.dbg.clock_${_V}: pdsim.c ${PDPOL}
69 ${C_COMPILE} -I. -I${SYSSRC} -DPDSIM -DDEBUG ${CLOCK_CFLAGS.${_V}} -o ${.TARGET} ${.ALLSRC}
70 .endfor
73 PROGS+= ${PDSIM_PROGS}
74 PROGS+= ${PDSIM_PROGS.DBG}
76 ALLPROGS= ${PROGS} ${CPROGS} ${HPROGS} ${TESTPROGS}
77 .SUFFIXES: .hs
79 _mkall: ${ALLPROGS}
81 clean:
82 rm -rf ${ALLPROGS}
83 rm -rf ${HPROGS:S/$/.hi/g}
84 rm -rf ${HPROGS:S/$/.o/g}
86 .hs:
87 rm -rf ${.IMPSRC:S/.hs/.o/g}
88 ghc -cpp -O -o ${.TARGET} --make ${.TARGET}
90 linux: nbsd.hs
91 rm -rf ${.ALLSRC:S/.hs/.o/g}
92 ghc -cpp -O -DLINUX -o ${.TARGET} --make nbsd