source: trunk/Makefile.frag @ 1

Last change on this file since 1 was 1, checked in by moo, 8 years ago

initial import to online

File size: 1.5 KB
Line 
1XCACHE_PROC_SRC=$(srcdir)/processor/main.m4
2XCACHE_PROC_OUT=$(builddir)/processor.out
3XCACHE_PROC_C=$(builddir)/processor_real.c
4XCACHE_PROC_H=$(builddir)/processor.h
5XCACHE_INCLUDES_SRC=$(srcdir)/includes.c
6XCACHE_INCLUDES_I=$(builddir)/includes.i
7XCACHE_STRUCT_OUT=$(builddir)/structinfo.m4
8
9$(XCACHE_INCLUDES_I): $(XCACHE_INCLUDES_SRC) $(srcdir)/xcache.h
10    $(CC) -I. -I$(srcdir) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)  -E $(XCACHE_INCLUDES_SRC) -o $(XCACHE_INCLUDES_I)
11
12$(XCACHE_STRUCT_OUT): $(XCACHE_INCLUDES_I) $(srcdir)/mkstructinfo.awk
13    $(AWK) -f $(srcdir)/mkstructinfo.awk < $(XCACHE_INCLUDES_I) > $(XCACHE_STRUCT_OUT)
14
15$(XCACHE_PROC_OUT): $(XCACHE_PROC_SRC) $(XCACHE_STRUCT_OUT) $(XCACHE_PROC_SOURCES)
16    m4 -I$(srcdir)/processor/ -I$(builddir)/ -I$(srcdir)/ $(XCACHE_ENABLE_TEST) -E $(XCACHE_PROC_SRC) > $(XCACHE_PROC_OUT).tmp && mv -f $(XCACHE_PROC_OUT).tmp $(XCACHE_PROC_OUT)
17
18$(XCACHE_PROC_H): $(XCACHE_PROC_OUT)
19    grep -F 'export: ' $(XCACHE_PROC_OUT) | sed -r 's/.*export:(.*):export.*/\1/g' | $(XCACHE_INDENT) > $(XCACHE_PROC_H).tmp && mv -f $(XCACHE_PROC_H).tmp $(XCACHE_PROC_H)
20
21$(XCACHE_PROC_C): $(XCACHE_PROC_OUT) $(XCACHE_PROC_H)
22    cat $(XCACHE_PROC_OUT) | $(XCACHE_INDENT) > $(XCACHE_PROC_C).tmp && mv -f $(XCACHE_PROC_C).tmp $(XCACHE_PROC_C)
23
24$(builddir)/processor.lo: $(XCACHE_PROC_C) $(XCACHE_PROC_H) $(srcdir)/processor.c
25
26$(builddir)/disassembler.lo: $(XCACHE_PROC_H) $(srcdir)/processor.c
27
28$(builddir)/xcache.lo: $(XCACHE_PROC_H) $(srcdir)/myshm.h $(srcdir)/stack.h $(srcdir)/xcache_globals.h $(srcdir)/xcache.c
Note: See TracBrowser for help on using the repository browser.