mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-21 13:29:36 +00:00
fix a minor bug in Launcher, add -Wl,-gc-sections to generate smaller executables
This commit is contained in:
parent
04e7e64a55
commit
7581140436
@ -1,6 +1,7 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set(CMAKE_C_FLAGS "-Wno-multichar")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-gc-sections")
|
||||
|
||||
add_application(Launcher
|
||||
FILES Launcher.c CONSOLE)
|
||||
|
@ -47,7 +47,7 @@ void EjectOldDisk()
|
||||
if(h)
|
||||
{
|
||||
short refNum = **(short**)h;
|
||||
printf("Ejecting disk (refNum = %d)\n", refNum);
|
||||
printf("Ejecting disk (refNum = %d)\n", (int)refNum);
|
||||
|
||||
Eject(NULL, refNum);
|
||||
UnmountVol(NULL, refNum);
|
||||
@ -136,7 +136,7 @@ int main()
|
||||
|
||||
printf("Launching...\n");
|
||||
err = LaunchApplication(&lpb);
|
||||
printf("Still here after launch (err = %d). Press Enter to exit.\n");
|
||||
printf("Still here after launch (err = %d). Press Enter to exit.\n", (int)err);
|
||||
getchar();
|
||||
return 0;
|
||||
}
|
||||
|
@ -32,6 +32,9 @@ if(APPLE)
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "-std=c++11")
|
||||
|
||||
# save 200KB of code by removing unused stuff
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-gc-sections")
|
||||
|
||||
add_application(Raytracer
|
||||
raytracer.c
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user