Commit | Line | Data |
---|---|---|
4fa134be ILT |
1 | # Makefile template for Configure for the MIPS simulator. |
2 | # Written by Cygnus Support. | |
3 | ||
19c5af72 DE |
4 | ## COMMON_PRE_CONFIG_FRAG |
5 | ||
fafce69a AC |
6 | srcdir=@srcdir@ |
7 | srcroot=$(srcdir)/../../ | |
8 | ||
9 | SIM_OBJS = interp.o \ | |
10 | sim-load.o \ | |
11 | sim-utils.o \ | |
12 | sim-hload.o \ | |
13 | sim-io.o \ | |
14 | sim-config.o \ | |
15 | sim-endian.o \ | |
16 | sim-engine.o \ | |
17 | sim-stop.o \ | |
18 | sim-resume.o \ | |
19 | sim-reason.o \ | |
20 | sim-events.o \ | |
21 | sim-module.o \ | |
22 | sim-trace.o \ | |
23 | sim-options.o \ | |
24 | sim-core.o \ | |
25 | sim-watch.o | |
26 | ||
27 | # List of flags to always pass to $(CC). | |
92f91d1f | 28 | SIM_SUBTARGET=@SIM_SUBTARGET@ |
fafce69a | 29 | |
295dbbe4 SG |
30 | # FIXME: Hack to find syscall.h? Better support for syscall.h |
31 | # is in progress. | |
fafce69a | 32 | SIM_EXTRA_CFLAGS = \ |
92f91d1f | 33 | $(SIM_SUBTARGET) \ |
fafce69a AC |
34 | -I$(srcdir)/../../newlib/libc/sys/idt |
35 | ||
295dbbe4 | 36 | SIM_EXTRA_CLEAN = clean-extra |
4fa134be | 37 | |
18c64df6 AC |
38 | SIM_EXTRA_ALL = tmp.igen |
39 | ||
fafce69a AC |
40 | # List of main object files for `run'. |
41 | SIM_RUN_OBJS = nrun.o | |
42 | ||
43 | ||
44 | ||
19c5af72 | 45 | ## COMMON_POST_CONFIG_FRAG |
4fa134be | 46 | |
284e759d | 47 | interp.o: $(srcdir)/interp.c oengine.c config.h sim-main.h |
4fa134be | 48 | |
284e759d AC |
49 | oengine.c: gencode |
50 | ./gencode @SIMCONF@ > tmp-oengine | |
51 | mv tmp-oengine oengine.c | |
18c64df6 AC |
52 | tmp.igen: gencode |
53 | ./gencode --igen @SIMCONF@ > tmp-igen | |
54 | mv tmp-igen tmp.igen | |
4fa134be | 55 | |
295dbbe4 SG |
56 | gencode: gencode.o getopt.o getopt1.o |
57 | $(CC_FOR_BUILD) -o $@ gencode.o getopt.o getopt1.o | |
4fa134be | 58 | |
295dbbe4 SG |
59 | gencode.o: $(srcdir)/gencode.c |
60 | $(CC_FOR_BUILD) -c -g -I${srcroot}/include $(srcdir)/gencode.c | |
18c64df6 | 61 | |
295dbbe4 SG |
62 | getopt.o: $(srcdir)/../../libiberty/getopt.c |
63 | $(CC_FOR_BUILD) -c -g -I${srcroot}/include $(srcdir)/../../libiberty/getopt.c | |
64 | getopt1.o: $(srcdir)/../../libiberty/getopt1.c | |
65 | $(CC_FOR_BUILD) -c -g -I${srcroot}/include $(srcdir)/../../libiberty/getopt1.c | |
4fa134be | 66 | |
295dbbe4 | 67 | clean-extra: |
18c64df6 | 68 | rm -f gencode engine.c tmp.igen |