Use $DOT_EXECUTABLE_SUFFIX instead of hardcoding .exe
This commit is contained in:
parent
16da5396aa
commit
82b7c8d5e2
24 changed files with 56 additions and 48 deletions
14
Makefile
14
Makefile
|
@ -70,26 +70,26 @@ bsnes/out/libsnes.$(ARCHIVE_SUFFIX): forcelook
|
|||
$(REALRANLIB) bsnes/out/libsnes.$(ARCHIVE_SUFFIX)
|
||||
|
||||
|
||||
src/__all_files__: src/core/version.cpp buildaux/mkdeps.exe buildaux/txt2cstr.exe forcelook
|
||||
src/__all_files__: src/core/version.cpp buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) buildaux/txt2cstr$(DOT_EXECUTABLE_SUFFIX) forcelook
|
||||
$(MAKE) -C src precheck
|
||||
$(MAKE) -C src
|
||||
cp src/lsnes$(DOT_EXECUTABLE_SUFFIX) .
|
||||
|
||||
buildaux/txt2cstr.exe: buildaux/txt2cstr.cpp
|
||||
buildaux/txt2cstr$(DOT_EXECUTABLE_SUFFIX): buildaux/txt2cstr.cpp
|
||||
$(HOSTCC) $(HOSTCCFLAGS) -o $@ $<
|
||||
buildaux/version.exe: buildaux/version.cpp VERSION
|
||||
buildaux/version$(DOT_EXECUTABLE_SUFFIX): buildaux/version.cpp VERSION
|
||||
$(HOSTCC) $(HOSTCCFLAGS) -o $@ $<
|
||||
buildaux/mkdeps.exe: buildaux/mkdeps.cpp VERSION
|
||||
buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX): buildaux/mkdeps.cpp VERSION
|
||||
$(HOSTCC) $(HOSTCCFLAGS) -o $@ $< -lboost_filesystem$(HOST_BOOST_POSTFIX) -lboost_system$(HOST_BOOST_POSTFIX)
|
||||
src/core/version.cpp: buildaux/version.exe forcelook
|
||||
buildaux/version.exe >$@
|
||||
src/core/version.cpp: buildaux/version$(DOT_EXECUTABLE_SUFFIX) forcelook
|
||||
buildaux/version$(DOT_EXECUTABLE_SUFFIX) >$@
|
||||
|
||||
platclean:
|
||||
$(MAKE) -C src platclean
|
||||
|
||||
clean:
|
||||
$(MAKE) -C src clean
|
||||
rm -f buildaux/version.exe
|
||||
rm -f buildaux/version$(DOT_EXECUTABLE_SUFFIX)
|
||||
|
||||
forcelook:
|
||||
@true
|
||||
|
|
|
@ -9,17 +9,17 @@ __all__.files: $(JSON_OBJECTS) inverselist.$(OBJECT_SUFFIX)
|
|||
lua ../genfilelist.lua $^ >$@
|
||||
touch $(ALLFLAGS)
|
||||
|
||||
mkstubs.exe: mkstubs.cpp ../library/json.cpp ../library/utf8.cpp ../library/string.cpp ../library/hex.cpp ../library/eatarg.cpp ../library/int24.cpp
|
||||
mkstubs$(DOT_EXECUTABLE_SUFFIX): mkstubs.cpp ../library/json.cpp ../library/utf8.cpp ../library/string.cpp ../library/hex.cpp ../library/eatarg.cpp ../library/int24.cpp
|
||||
$(HOSTCC) -g -std=gnu++0x -I../../include/library -o $@ $^ -lboost_regex$(HOST_BOOST_POSTFIX) -lboost_system$(HOST_BOOST_POSTFIX) -Wall
|
||||
|
||||
mkstubsi.exe: mkstubsi.cpp ../library/json.cpp ../library/utf8.cpp ../library/string.cpp ../library/hex.cpp ../library/eatarg.cpp ../library/int24.cpp
|
||||
mkstubsi$(DOT_EXECUTABLE_SUFFIX): mkstubsi.cpp ../library/json.cpp ../library/utf8.cpp ../library/string.cpp ../library/hex.cpp ../library/eatarg.cpp ../library/int24.cpp
|
||||
$(HOSTCC) -g -std=gnu++0x -I../../include/library -o $@ $^ -lboost_regex$(HOST_BOOST_POSTFIX) -lboost_system$(HOST_BOOST_POSTFIX) -Wall
|
||||
|
||||
inverselist.cpp: $(JSON_FILES) mkstubsi.exe
|
||||
./mkstubsi.exe $^
|
||||
inverselist.cpp: $(JSON_FILES) mkstubsi$(DOT_EXECUTABLE_SUFFIX)
|
||||
./mkstubsi$(DOT_EXECUTABLE_SUFFIX) $^
|
||||
|
||||
%.cpp: %.json mkstubs.exe
|
||||
./mkstubs.exe $<
|
||||
%.cpp: %.json mkstubs$(DOT_EXECUTABLE_SUFFIX)
|
||||
./mkstubs$(DOT_EXECUTABLE_SUFFIX) $<
|
||||
mv *.hpp ../../include/cmdhelp
|
||||
|
||||
%.$(OBJECT_SUFFIX): %.cpp
|
||||
|
@ -33,7 +33,7 @@ precheck:
|
|||
|
||||
clean:
|
||||
rm -f *.$(OBJECT_SUFFIX) $(JSON_SRC) inverselist.cpp __all__.ldflags __all__.files
|
||||
rm -f mkstubs.exe
|
||||
rm -f mkstubs$(DOT_EXECUTABLE_SUFFIX)
|
||||
|
||||
forcelook:
|
||||
@true
|
||||
|
|
|
@ -44,6 +44,14 @@ void process_command_inverse(JSON::node& n, std::string name, std::ostream& imp)
|
|||
}
|
||||
}
|
||||
|
||||
bool is_crap_filename(const std::string& arg)
|
||||
{
|
||||
if(arg.length() >= 4 && arg.substr(arg.length() - 4) == ".exe") return true;
|
||||
if(arg.length() >= 9 && arg.substr(arg.length() - 9) == "/mkstubsi") return true;
|
||||
if(arg == "mkstubsi") return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::ofstream impl("inverselist.cpp");
|
||||
|
@ -54,7 +62,7 @@ int main(int argc, char** argv)
|
|||
|
||||
for(int i = 1; i < argc; i++) {
|
||||
//Hack, skip crap.
|
||||
if(argv[i][0] == 0 || argv[i][strlen(argv[i])-1] == 'e')
|
||||
if(argv[i][0] == 0 || is_crap_filename(argv[i]))
|
||||
continue;
|
||||
std::ifstream infile(argv[i]);
|
||||
std::string in_json;
|
||||
|
|
|
@ -10,7 +10,7 @@ __all__.files: $(OBJECTS)
|
|||
$(REALCC) $(CFLAGS) -c -o $@ $< -I../../include -Wall
|
||||
|
||||
precheck:
|
||||
../../buildaux/mkdeps.exe ../../include -- *.cpp
|
||||
../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../include -- *.cpp
|
||||
@true
|
||||
|
||||
clean:
|
||||
|
|
|
@ -8,19 +8,19 @@ __all__.files: $(CORES_FILES)
|
|||
lua ../genfilelist.lua $^ >$@
|
||||
cat $(CORES_FLAGS) >$(ALLFLAGS)
|
||||
|
||||
make-ports.exe: make-ports.cpp ../library/json.cpp ../library/utf8.cpp ../library/string.cpp ../library/portctrl-parse.cpp ../library/portctrl-data.cpp ../library/sha256.cpp ../library/assembler.cpp ../library/hex.cpp ../library/eatarg.cpp ../library/int24.cpp ../library/binarystream.cpp ../library/integer-pool.cpp
|
||||
make-ports$(DOT_EXECUTABLE_SUFFIX): make-ports.cpp ../library/json.cpp ../library/utf8.cpp ../library/string.cpp ../library/portctrl-parse.cpp ../library/portctrl-data.cpp ../library/sha256.cpp ../library/assembler.cpp ../library/hex.cpp ../library/eatarg.cpp ../library/int24.cpp ../library/binarystream.cpp ../library/integer-pool.cpp
|
||||
$(HOSTCC) -g -std=gnu++0x -I../../include/library -o $@ $^ -lboost_regex$(HOST_BOOST_POSTFIX) -lboost_system$(HOST_BOOST_POSTFIX) -Wall -DNO_ASM_GENERATION
|
||||
|
||||
bsnes-legacy/$(ALLFILES): forcelook make-ports.exe
|
||||
bsnes-legacy/$(ALLFILES): forcelook make-ports$(DOT_EXECUTABLE_SUFFIX)
|
||||
$(MAKE) -C bsnes-legacy
|
||||
|
||||
gambatte/$(ALLFILES): forcelook make-ports.exe
|
||||
gambatte/$(ALLFILES): forcelook make-ports$(DOT_EXECUTABLE_SUFFIX)
|
||||
$(MAKE) -C gambatte
|
||||
|
||||
sky/$(ALLFILES): forcelook make-ports.exe
|
||||
sky/$(ALLFILES): forcelook make-ports$(DOT_EXECUTABLE_SUFFIX)
|
||||
$(MAKE) -C sky
|
||||
|
||||
test/$(ALLFILES): forcelook make-ports.exe
|
||||
test/$(ALLFILES): forcelook make-ports$(DOT_EXECUTABLE_SUFFIX)
|
||||
$(MAKE) -C test
|
||||
|
||||
.PRECIOUS: %.$(OBJECT_SUFFIX) %.files
|
||||
|
@ -37,7 +37,7 @@ clean:
|
|||
$(MAKE) -C gambatte clean
|
||||
$(MAKE) -C sky clean
|
||||
$(MAKE) -C test clean
|
||||
rm -f make-ports.exe
|
||||
rm -f make-ports$(DOT_EXECUTABLE_SUFFIX)
|
||||
|
||||
forcelook:
|
||||
@true
|
||||
|
|
|
@ -37,8 +37,8 @@ __all__.files: $(OBJECTS) ../../../$(BSNES_LIBRARY)
|
|||
$(MAKE) -C ../../../bsnes $(BSNES_PROFILE_STRING) $(BSNES_TARGET_STRING)
|
||||
$(REALRANLIB) $@
|
||||
|
||||
ports.inc: ports.json ../make-ports.exe
|
||||
../make-ports.exe <$< >$@
|
||||
ports.inc: ports.json ../make-ports$(DOT_EXECUTABLE_SUFFIX)
|
||||
../make-ports$(DOT_EXECUTABLE_SUFFIX) <$< >$@
|
||||
|
||||
%.$(OBJECT_SUFFIX): %.cpp %.cpp.dep ports.inc
|
||||
$(REALCC) -c -o $@ $< -I../../../include -I../../../bsnes $(CFLAGS) $(BSNES_CFLAGS) -Wreturn-type
|
||||
|
@ -55,7 +55,7 @@ forcelook:
|
|||
@true
|
||||
|
||||
precheck:
|
||||
../../../buildaux/mkdeps.exe ../../../include -- *.cpp
|
||||
../../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../../include -- *.cpp
|
||||
@true
|
||||
|
||||
clean:
|
||||
|
|
|
@ -15,8 +15,8 @@ __all__.files: $(OBJECTS) ../../../$(GAMBATTE_LIBRARY)
|
|||
$(MAKE) -C ../../../gambatte
|
||||
$(REALRANLIB) $@
|
||||
|
||||
ports.inc: ports.json ../make-ports.exe
|
||||
../make-ports.exe <$< >$@
|
||||
ports.inc: ports.json ../make-ports$(DOT_EXECUTABLE_SUFFIX)
|
||||
../make-ports$(DOT_EXECUTABLE_SUFFIX) <$< >$@
|
||||
|
||||
%.$(OBJECT_SUFFIX): %.cpp %.cpp.dep ports.inc
|
||||
$(REALCC) -c -o $@ $< -I../../../include -I../../../gambatte $(CFLAGS) $(GAMBATTE_CFLAGS) -Wreturn-type
|
||||
|
@ -34,7 +34,7 @@ forcelook:
|
|||
@true
|
||||
|
||||
precheck:
|
||||
../../../buildaux/mkdeps.exe ../../../include ../../../gambatte -- *.cpp
|
||||
../../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../../include ../../../gambatte -- *.cpp
|
||||
@true
|
||||
|
||||
clean:
|
||||
|
|
|
@ -13,7 +13,7 @@ forcelook:
|
|||
@true
|
||||
|
||||
precheck:
|
||||
../../../buildaux/mkdeps.exe ../../../include -- *.cpp
|
||||
../../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../../include -- *.cpp
|
||||
@true
|
||||
|
||||
clean:
|
||||
|
|
|
@ -6,8 +6,8 @@ __all__.files: $(OBJECTS)
|
|||
lua ../../genfilelist.lua $^ >$@
|
||||
echo >__all__.ldflags
|
||||
|
||||
ports.inc: ports.json ../make-ports.exe
|
||||
../make-ports.exe <$< >$@
|
||||
ports.inc: ports.json ../make-ports$(DOT_EXECUTABLE_SUFFIX)
|
||||
../make-ports$(DOT_EXECUTABLE_SUFFIX) <$< >$@
|
||||
|
||||
%.$(OBJECT_SUFFIX): %.cpp %.cpp.dep ports.inc
|
||||
$(REALCC) -c -o $@ $< -I../../../include $(CFLAGS)
|
||||
|
@ -16,7 +16,7 @@ forcelook:
|
|||
@true
|
||||
|
||||
precheck:
|
||||
../../../buildaux/mkdeps.exe ../../../include -- *.cpp
|
||||
../../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../../include -- *.cpp
|
||||
@true
|
||||
|
||||
clean:
|
||||
|
|
|
@ -19,7 +19,7 @@ font.cpp font.cpp.dep: $(FONT_SRC)
|
|||
touch font.cpp.dep
|
||||
|
||||
precheck:
|
||||
../../buildaux/mkdeps.exe ../../include -- *.cpp
|
||||
../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../include -- *.cpp
|
||||
@true
|
||||
|
||||
forcelook:
|
||||
|
|
|
@ -10,7 +10,7 @@ __all__.files: $(OBJECTS)
|
|||
$(REALCC) $(CFLAGS) -c -o $@ $< -I../../include -Wall
|
||||
|
||||
precheck:
|
||||
../../buildaux/mkdeps.exe ../../include -- *.cpp
|
||||
../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../include -- *.cpp
|
||||
@true
|
||||
|
||||
forcelook:
|
||||
|
|
|
@ -10,7 +10,7 @@ __all__.files: $(OBJECTS)
|
|||
$(REALCC) $(CFLAGS) -c -o $@ $< -I../../include/library -Wall
|
||||
|
||||
precheck: forcelook
|
||||
../../buildaux/mkdeps.exe ../../include/library -- *.cpp
|
||||
../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../include/library -- *.cpp
|
||||
@true
|
||||
|
||||
forcelook:
|
||||
|
|
|
@ -8,7 +8,7 @@ __all__.files: $(OBJECTS)
|
|||
|
||||
sysrc.cpp: sysrc.lua
|
||||
luac -p $<
|
||||
../../buildaux/txt2cstr.exe lua_sysrc_script $< >$@
|
||||
../../buildaux/txt2cstr$(DOT_EXECUTABLE_SUFFIX) lua_sysrc_script $< >$@
|
||||
|
||||
sysrc.cpp.dep: sysrc.cpp
|
||||
touch sysrc.cpp.dep
|
||||
|
@ -17,7 +17,7 @@ sysrc.cpp.dep: sysrc.cpp
|
|||
$(REALCC) -c -o $@ $< -I../../include $(CFLAGS) -Wall
|
||||
|
||||
precheck:
|
||||
../../buildaux/mkdeps.exe ../../include -- *.cpp
|
||||
../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../include -- *.cpp
|
||||
@true
|
||||
|
||||
forcelook:
|
||||
|
|
|
@ -14,7 +14,7 @@ __all__.files: $(OBJECTS)
|
|||
$(REALCC) -c -o $@ $< -I../../../include $(CFLAGS) -Wall
|
||||
|
||||
precheck:
|
||||
../../../buildaux/mkdeps.exe ../../../include -- *.cpp
|
||||
../../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../../include -- *.cpp
|
||||
@true
|
||||
|
||||
forcelook:
|
||||
|
|
|
@ -16,7 +16,7 @@ __all__.files: $(OBJECTS)
|
|||
$(REALCC) -c -o $@ $< -I../../../include $(CFLAGS) $(PA_CFLAGS)
|
||||
|
||||
precheck:
|
||||
../../../buildaux/mkdeps.exe ../../../include -- *.cpp
|
||||
../../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../../include -- *.cpp
|
||||
@true
|
||||
|
||||
forcelook:
|
||||
|
|
|
@ -17,7 +17,7 @@ __all__.files: $(OBJECTS)
|
|||
$(REALCC) -DSDL_JOYSTICK_IOKIT -x c --std=gnu99 -c -o $@ $< $(CSTDFLAGS)
|
||||
|
||||
precheck:
|
||||
../../../buildaux/mkdeps.exe ../../../include -- *.cpp *.c
|
||||
../../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../../include -- *.cpp *.c
|
||||
@true
|
||||
|
||||
forcelook:
|
||||
|
|
|
@ -17,7 +17,7 @@ __all__.files: $(OBJECTS)
|
|||
$(REALCC) -c -o $@ $< -I../../../include $(CFLAGS) $(PA_CFLAGS) -Wall
|
||||
|
||||
precheck:
|
||||
../../../buildaux/mkdeps.exe ../../../include -- *.cpp
|
||||
../../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../../include -- *.cpp
|
||||
@true
|
||||
|
||||
forcelook:
|
||||
|
|
|
@ -14,7 +14,7 @@ __all__.files: $(OBJECTS)
|
|||
$(REALCC) -c -o $@ $< -I../../../include $(CFLAGS)
|
||||
|
||||
precheck:
|
||||
../../../buildaux/mkdeps.exe ../../../include -- *.cpp
|
||||
../../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../../include -- *.cpp
|
||||
@true
|
||||
|
||||
forcelook:
|
||||
|
|
|
@ -24,7 +24,7 @@ __all__.files: $(OBJECTS)
|
|||
$(REALCC) -c -o $@ $< -I../../../include $(CFLAGS) $(WXW_CFLAGS)
|
||||
|
||||
precheck:
|
||||
../../../buildaux/mkdeps.exe ../../../include -- *.cpp
|
||||
../../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../../include -- *.cpp
|
||||
@true
|
||||
|
||||
forcelook:
|
||||
|
|
|
@ -9,7 +9,7 @@ __all_files__: $(OBJECTS)
|
|||
$(REALCC) -c -o $@ $< -I../../include $(CFLAGS)
|
||||
|
||||
precheck:
|
||||
../../buildaux/mkdeps.exe ../../include -- *.cpp
|
||||
../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../include -- *.cpp
|
||||
@true
|
||||
|
||||
forcelook:
|
||||
|
|
|
@ -21,7 +21,7 @@ forcelook:
|
|||
@true
|
||||
|
||||
precheck:
|
||||
../../buildaux/mkdeps.exe ../../include -- *.cpp
|
||||
../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../include -- *.cpp
|
||||
$(MAKE) -C avi precheck
|
||||
|
||||
clean:
|
||||
|
|
|
@ -15,7 +15,7 @@ forcelook:
|
|||
@true
|
||||
|
||||
precheck:
|
||||
../../../buildaux/mkdeps.exe ../../../include -- *.cpp
|
||||
../../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../../include -- *.cpp
|
||||
$(MAKE) -C codec precheck
|
||||
|
||||
clean:
|
||||
|
|
|
@ -9,7 +9,7 @@ __all__.files: $(OBJECTS)
|
|||
$(REALCC) $(CFLAGS) -c -o $@ $< -I../../../../../include
|
||||
|
||||
precheck:
|
||||
../../../../../buildaux/mkdeps.exe ../../../../../include -- *.cpp
|
||||
../../../../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../../../../include -- *.cpp
|
||||
@true
|
||||
|
||||
forcelook:
|
||||
|
|
|
@ -9,7 +9,7 @@ __all__.files: $(OBJECTS)
|
|||
$(REALCC) $(CFLAGS) -c -o $@ $< -I../../../../../include
|
||||
|
||||
precheck:
|
||||
../../../../../buildaux/mkdeps.exe ../../../../../include -- *.cpp
|
||||
../../../../../buildaux/mkdeps$(DOT_EXECUTABLE_SUFFIX) ../../../../../include -- *.cpp
|
||||
@true
|
||||
|
||||
forcelook:
|
||||
|
|
Loading…
Add table
Reference in a new issue