Skip to content

Commit

Permalink
Fixing the build on GNU/Linux. Please report if this breaks the build…
Browse files Browse the repository at this point in the history
… on other systems. I hope it doesn't.

* "-lpthread" was ignored by GCC resulting in a linking error. Declaring it closer to the other linker parameters fixed the issue.
* There was an #endif misplaced which was improperly including the closing bracket of a switch statement. So when the #ifdef was false, the resulting code would get broken.
* Also the #include "libz/libz.h" was resulting in the header not being found. I switched it to #include <libz.h> so it will look for the file in the system default library include directories.
  • Loading branch information
felipesanches committed Nov 9, 2014
1 parent 177260e commit 4ac9870
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VGMPlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#endif
#endif

#include "zlib/zlib.h"
#include <zlib.h>

#include "chips/mamedef.h"

Expand Down
2 changes: 1 addition & 1 deletion VGMPlay_AddFmts.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#ifdef WIN32
#include <windows.h>
#endif
#include "zlib/zlib.h"
#include <zlib.h>

#include "chips/mamedef.h"

Expand Down
2 changes: 1 addition & 1 deletion chips/sn764intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ void device_stop_sn764xx(UINT8 ChipID)
case EC_MAXIM:
SN76489_Shutdown((SN76489_Context*)info->chip);
break;
}
#endif
}
}

void device_reset_sn764xx(UINT8 ChipID)
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ EMUOBJS = \
$(EMUOBJ)/ymz280b.o

VGMPlay: $(OBJDIRS) $(MAINOBJS) $(EMUOBJS)
$(CC) -lpthread $(MAINOBJS) $(EMUOBJS) -lm -lrt -Wl,-lz -o VGMPlay
$(CC) $(MAINOBJS) $(EMUOBJS) -lpthread -lm -lrt -Wl,-lz -o VGMPlay

# compile the main c-files
$(OBJ)/%.o: $(SRC)/%.c
Expand Down

0 comments on commit 4ac9870

Please sign in to comment.