1 __all_files__
: util
/__all_files__ \
2 lsnes
$(DOT_EXECUTABLE_SUFFIX
) \
3 $(patsubst %.
cpp,%.util
$(DOT_EXECUTABLE_SUFFIX
),$(wildcard util
/*.
cpp))
14 ifdef BOOST_FILESYSTEM3
15 CFLAGS
+= -DBOOST_FILESYSTEM3
19 CFLAGS
+= -DWITH_OPUS_CODEC
$(shell pkg-config
--cflags opus
)
20 LDFLAGS
+= $(shell pkg-config
--libs opus
)
23 COMMON_LIBRARY
=core lua fonts library interface video emulation
24 ALLFILES
=__all__.files
25 ALLFLAGS
=__all__.
ldflags
26 COMMON_LIBRARY_FILES
=$(patsubst %,%/$(ALLFILES
),$(COMMON_LIBRARY
))
27 COMMON_LIBRARY_FLAGS
=$(patsubst %,%/$(ALLFLAGS
),$(COMMON_LIBRARY
))
28 PLATFORM_LIBRARY_FILES
=platform
/$(ALLFILES
)
29 PLATFORM_LIBRARY_FLAGS
=platform
/$(ALLFLAGS
)
31 __all_common__.files
: $(COMMON_LIBRARY_FILES
)
32 lua genfilelist.lua
$^
>$@
34 __all_platform__.files
: $(PLATFORM_LIBRARY_FILES
)
35 lua genfilelist.lua
$^
>$@
37 core
/$(ALLFILES
): forcelook
40 emulation
/$(ALLFILES
): forcelook
43 fonts
/$(ALLFILES
): forcelook
46 library
/$(ALLFILES
): forcelook
49 interface
/$(ALLFILES
): forcelook
52 lua
/$(ALLFILES
): forcelook
55 platform
/$(ALLFILES
): forcelook
58 util
/__all_files__
: forcelook
61 util
/%.
$(OBJECT_SUFFIX
): util
/__all_files__
64 video
/$(ALLFILES
): forcelook
67 .PRECIOUS
: %.
$(OBJECT_SUFFIX
) util
/%.
$(OBJECT_SUFFIX
) %.files
69 %.util
$(DOT_EXECUTABLE_SUFFIX
): %.
$(OBJECT_SUFFIX
) __all_common__.files
70 $(REALCC
) -o
$@
$< `cat __all_common__.files` $(LDFLAGS
) `cat $(COMMON_LIBRARY_FLAGS)`
72 lsnes
$(DOT_EXECUTABLE_SUFFIX
): __all_common__.files __all_platform__.files
73 $(REALCC
) -o
$@
`cat __all_common__.files __all_platform__.files` $(LDFLAGS
) `cat $(COMMON_LIBRARY_FLAGS) $(PLATFORM_LIBRARY_FLAGS)`
76 $(MAKE
) -C core precheck
77 $(MAKE
) -C emulation precheck
78 $(MAKE
) -C interface precheck
79 $(MAKE
) -C library precheck
80 $(MAKE
) -C lua precheck
81 $(MAKE
) -C platform precheck
82 $(MAKE
) -C util precheck
83 $(MAKE
) -C video precheck
86 rm -f
*.
$(OBJECT_SUFFIX
) *.
ldflags
88 $(MAKE
) -C emulation
clean
89 $(MAKE
) -C fonts
clean
90 $(MAKE
) -C interface
clean
91 $(MAKE
) -C library
clean
93 $(MAKE
) -C platform
clean
95 $(MAKE
) -C video
clean