1prefix = @prefix@
2exec_prefix = @exec_prefix@
3datarootdir = @datarootdir@
4bindir = @bindir@
5datadir = @datadir@
6pkgdatadir = @datadir@/tilem2
7mandir = @mandir@
8
9top_builddir = @top_builddir@
10top_srcdir = @top_srcdir@
11srcdir = @srcdir@
12VPATH = @srcdir@
13@SET_MAKE@
14
15AR = @AR@
16CC = @CC@
17CFLAGS = @CFLAGS@
18CPPFLAGS = @CPPFLAGS@
19DEFS = @DEFS@
20OPT_CFLAGS = @OPT_CFLAGS@
21RANLIB = @RANLIB@
22SHELL = @SHELL@
23
24core_objects = calcs.o z80.o state.o rom.o flash.o link.o keypad.o lcd.o \
25	cert.o md5.o timers.o monolcd.o graylcd.o grayimage.o graycolor.o
26
27x7_objects = x7_init.o x7_io.o x7_memory.o x7_subcore.o
28x1_objects = x1_init.o x1_io.o x1_memory.o x1_subcore.o
29x2_objects = x2_init.o x2_io.o x2_memory.o x2_subcore.o
30x3_objects = x3_init.o x3_io.o x3_memory.o x3_subcore.o
31xp_objects = xp_init.o xp_io.o xp_memory.o xp_subcore.o
32xs_objects = xs_init.o xs_io.o xs_memory.o xs_subcore.o
33x4_objects = x4_init.o x4_io.o x4_memory.o x4_subcore.o
34xz_objects = xz_init.o xz_io.o xz_memory.o xz_subcore.o
35xn_objects = xn_init.o xn_io.o xn_memory.o xn_subcore.o
36x5_objects = x5_init.o x5_io.o x5_memory.o x5_subcore.o
37x6_objects = x6_init.o x6_io.o x6_memory.o x6_subcore.o
38
39objects = $(core_objects) $(x7_objects) $(x1_objects) $(x2_objects) \
40	$(x3_objects) $(xp_objects) $(xs_objects) $(x4_objects) $(xz_objects) \
41	$(xn_objects) $(x5_objects) $(x6_objects)
42
43compile = $(CC) -I$(top_builddir) -I$(srcdir) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(OPT_CFLAGS)
44
45all: libtilemcore.a
46
47libtilemcore.a: $(objects)
48	$(AR) cru libtilemcore.a $(objects)
49	$(RANLIB) libtilemcore.a
50
51# Main emulator core
52
53calcs.o: calcs.c tilem.h z80.h ../config.h
54	$(compile) -c $(srcdir)/calcs.c
55z80.o: z80.c z80.h z80cmds.h z80main.h z80cb.h z80ddfd.h z80ed.h tilem.h ../config.h
56	$(compile) -c $(srcdir)/z80.c
57state.o: state.c tilem.h z80.h ../config.h
58	$(compile) -c $(srcdir)/state.c
59rom.o: rom.c tilem.h ../config.h
60	$(compile) -c $(srcdir)/rom.c
61flash.o: flash.c tilem.h ../config.h
62	$(compile) -c $(srcdir)/flash.c
63link.o: link.c tilem.h ../config.h
64	$(compile) -c $(srcdir)/link.c
65keypad.o: keypad.c tilem.h scancodes.h ../config.h
66	$(compile) -c $(srcdir)/keypad.c
67lcd.o: lcd.c tilem.h ../config.h
68	$(compile) -c $(srcdir)/lcd.c
69cert.o: cert.c tilem.h ../config.h
70	$(compile) -c $(srcdir)/cert.c
71md5.o: md5.c tilem.h ../config.h
72	$(compile) -c $(srcdir)/md5.c
73timers.o: timers.c tilem.h ../config.h
74	$(compile) -c $(srcdir)/timers.c
75monolcd.o: monolcd.c tilem.h ../config.h
76	$(compile) -c $(srcdir)/monolcd.c
77graylcd.o: graylcd.c tilem.h graylcd.h ../config.h
78	$(compile) -c $(srcdir)/graylcd.c
79grayimage.o: grayimage.c tilem.h graylcd.h ../config.h
80	$(compile) -c $(srcdir)/grayimage.c
81graycolor.o: graycolor.c tilem.h ../config.h
82	$(compile) -c $(srcdir)/graycolor.c
83
84# TI-73
85
86x7_init.o: x7/x7_init.c x7/x7.h tilem.h ../config.h
87	$(compile) -c $(srcdir)/x7/x7_init.c
88x7_io.o: x7/x7_io.c x7/x7.h tilem.h ../config.h
89	$(compile) -c $(srcdir)/x7/x7_io.c
90x7_memory.o: x7/x7_memory.c x7/x7.h tilem.h ../config.h
91	$(compile) -c $(srcdir)/x7/x7_memory.c
92x7_subcore.o: x7/x7_subcore.c x7/x7.h tilem.h ../config.h
93	$(compile) -c $(srcdir)/x7/x7_subcore.c
94
95# TI-81
96
97x1_init.o: x1/x1_init.c x1/x1.h tilem.h ../config.h
98	$(compile) -c $(srcdir)/x1/x1_init.c
99x1_io.o: x1/x1_io.c x1/x1.h tilem.h ../config.h
100	$(compile) -c $(srcdir)/x1/x1_io.c
101x1_memory.o: x1/x1_memory.c x1/x1.h tilem.h ../config.h
102	$(compile) -c $(srcdir)/x1/x1_memory.c
103x1_subcore.o: x1/x1_subcore.c x1/x1.h tilem.h ../config.h
104	$(compile) -c $(srcdir)/x1/x1_subcore.c
105
106# TI-82
107
108x2_init.o: x2/x2_init.c x2/x2.h tilem.h ../config.h
109	$(compile) -c $(srcdir)/x2/x2_init.c
110x2_io.o: x2/x2_io.c x2/x2.h tilem.h ../config.h
111	$(compile) -c $(srcdir)/x2/x2_io.c
112x2_memory.o: x2/x2_memory.c x2/x2.h tilem.h ../config.h
113	$(compile) -c $(srcdir)/x2/x2_memory.c
114x2_subcore.o: x2/x2_subcore.c x2/x2.h tilem.h ../config.h
115	$(compile) -c $(srcdir)/x2/x2_subcore.c
116
117# TI-83
118
119x3_init.o: x3/x3_init.c x3/x3.h tilem.h ../config.h
120	$(compile) -c $(srcdir)/x3/x3_init.c
121x3_io.o: x3/x3_io.c x3/x3.h tilem.h ../config.h
122	$(compile) -c $(srcdir)/x3/x3_io.c
123x3_memory.o: x3/x3_memory.c x3/x3.h tilem.h ../config.h
124	$(compile) -c $(srcdir)/x3/x3_memory.c
125x3_subcore.o: x3/x3_subcore.c x3/x3.h tilem.h ../config.h
126	$(compile) -c $(srcdir)/x3/x3_subcore.c
127
128# TI-83 Plus
129
130xp_init.o: xp/xp_init.c xp/xp.h tilem.h ../config.h
131	$(compile) -c $(srcdir)/xp/xp_init.c
132xp_io.o: xp/xp_io.c xp/xp.h tilem.h ../config.h
133	$(compile) -c $(srcdir)/xp/xp_io.c
134xp_memory.o: xp/xp_memory.c xp/xp.h tilem.h ../config.h
135	$(compile) -c $(srcdir)/xp/xp_memory.c
136xp_subcore.o: xp/xp_subcore.c xp/xp.h tilem.h ../config.h
137	$(compile) -c $(srcdir)/xp/xp_subcore.c
138
139# TI-83 Plus SE
140
141xs_init.o: xs/xs_init.c xs/xs.h tilem.h ../config.h
142	$(compile) -c $(srcdir)/xs/xs_init.c
143xs_io.o: xs/xs_io.c xs/xs.h tilem.h ../config.h
144	$(compile) -c $(srcdir)/xs/xs_io.c
145xs_memory.o: xs/xs_memory.c xs/xs.h tilem.h ../config.h
146	$(compile) -c $(srcdir)/xs/xs_memory.c
147xs_subcore.o: xs/xs_subcore.c xs/xs.h tilem.h ../config.h
148	$(compile) -c $(srcdir)/xs/xs_subcore.c
149
150# TI-84 Plus
151
152x4_init.o: x4/x4_init.c x4/x4.h tilem.h ../config.h
153	$(compile) -c $(srcdir)/x4/x4_init.c
154x4_io.o: x4/x4_io.c x4/x4.h tilem.h ../config.h
155	$(compile) -c $(srcdir)/x4/x4_io.c
156x4_memory.o: x4/x4_memory.c x4/x4.h tilem.h ../config.h
157	$(compile) -c $(srcdir)/x4/x4_memory.c
158x4_subcore.o: x4/x4_subcore.c x4/x4.h tilem.h ../config.h
159	$(compile) -c $(srcdir)/x4/x4_subcore.c
160
161# TI-84 Plus SE
162
163xz_init.o: xz/xz_init.c xz/xz.h tilem.h ../config.h
164	$(compile) -c $(srcdir)/xz/xz_init.c
165xz_io.o: xz/xz_io.c xz/xz.h tilem.h ../config.h
166	$(compile) -c $(srcdir)/xz/xz_io.c
167xz_memory.o: xz/xz_memory.c xz/xz.h tilem.h ../config.h
168	$(compile) -c $(srcdir)/xz/xz_memory.c
169xz_subcore.o: xz/xz_subcore.c xz/xz.h tilem.h ../config.h
170	$(compile) -c $(srcdir)/xz/xz_subcore.c
171
172# TI-Nspire 84 Plus emulator
173
174xn_init.o: xn/xn_init.c xn/xn.h tilem.h ../config.h
175	$(compile) -c $(srcdir)/xn/xn_init.c
176xn_io.o: xn/xn_io.c xn/xn.h tilem.h ../config.h
177	$(compile) -c $(srcdir)/xn/xn_io.c
178xn_memory.o: xn/xn_memory.c xn/xn.h tilem.h ../config.h
179	$(compile) -c $(srcdir)/xn/xn_memory.c
180xn_subcore.o: xn/xn_subcore.c xn/xn.h tilem.h ../config.h
181	$(compile) -c $(srcdir)/xn/xn_subcore.c
182
183# TI-85
184
185x5_init.o: x5/x5_init.c x5/x5.h tilem.h ../config.h
186	$(compile) -c $(srcdir)/x5/x5_init.c
187x5_io.o: x5/x5_io.c x5/x5.h tilem.h ../config.h
188	$(compile) -c $(srcdir)/x5/x5_io.c
189x5_memory.o: x5/x5_memory.c x5/x5.h tilem.h ../config.h
190	$(compile) -c $(srcdir)/x5/x5_memory.c
191x5_subcore.o: x5/x5_subcore.c x5/x5.h tilem.h ../config.h
192	$(compile) -c $(srcdir)/x5/x5_subcore.c
193
194# TI-86
195
196x6_init.o: x6/x6_init.c x6/x6.h tilem.h ../config.h
197	$(compile) -c $(srcdir)/x6/x6_init.c
198x6_io.o: x6/x6_io.c x6/x6.h tilem.h ../config.h
199	$(compile) -c $(srcdir)/x6/x6_io.c
200x6_memory.o: x6/x6_memory.c x6/x6.h tilem.h ../config.h
201	$(compile) -c $(srcdir)/x6/x6_memory.c
202x6_subcore.o: x6/x6_subcore.c x6/x6.h tilem.h ../config.h
203	$(compile) -c $(srcdir)/x6/x6_subcore.c
204
205
206clean:
207	rm -f *.o
208	rm -f libtilemcore.a
209
210
211Makefile: Makefile.in $(top_builddir)/config.status
212	cd $(top_builddir) && $(SHELL) ./config.status
213
214$(top_builddir)/config.status: $(top_srcdir)/configure
215	cd $(top_builddir) && $(SHELL) ./config.status --recheck
216
217.PRECIOUS: Makefile $(top_builddir)/config.status
218.PHONY: clean all
219