Skip to content

Commit

Permalink
Improved makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
bucanero committed Dec 23, 2019
1 parent 4879576 commit 3449e00
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ CXXFLAGS = $(CFLAGS)

LDFLAGS = $(MACHDEP) -Wl,-Map,$(notdir $@).map


ifdef PKGI_ENABLE_LOGGING
CFLAGS += -DPKGI_ENABLE_LOGGING
endif
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,15 @@ You need to have installed:
- [PSL1GHT](https://github.com/bucanero/PSL1GHT) library
- [tiny3D lib & libfont](https://github.com/Estwald/PSDK3v2/tree/master/libraries-src/Tiny3D) (from Estwald)
- [YA2D lib](https://github.com/bucanero/ya2d_ps3) (an extended version from my repo)
- [MikMod lib](https://github.com/ps3dev/ps3libraries/blob/master/scripts/011-libmikmod-3.1.11.sh)
- [dbglogger lib](https://github.com/bucanero/psl1ght-libs/tree/master/dbglogger) (my own debug logging library)

Run `make` to create a release build. After than run `make pkg` to create a `.pkg` install file.
Run `make` to create a release build. After that, run `make pkg` to create a `.pkg` install file.

You can also set the environment variable `PS3LOAD=tcp:x.x.x.x` to the PS3's IP address;
that will allow to use `make run` and send `pkgi-ps3.self` directly to the PS3Load listener.
that will allow you to use `make run` and send `pkgi-ps3.self` directly to the PS3Load listener.

To enable debugging logging pass `-DPKGI_ENABLE_LOGGING=ON` argument to make. Then application will send debug messages to
To enable debug logging, build PKGi PS3 with `make PKGI_ENABLE_LOGGING`. The application will send debug messages to
UDP multicast address 239.255.0.100:30000. To receive them you can use [socat][] on your PC:

$ socat udp4-recv:30000,ip-add-membership=239.255.0.100:0.0.0.0 -
Expand Down
7 changes: 1 addition & 6 deletions include/pkgi.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#include <stdint.h>
#include <stdarg.h>

#include <dbglogger.h>

#define PKGI_UPDATE_URL "https://api.github.com/repos/bucanero/pkgi-ps3/releases/latest"
#define PKGI_VERSION "1.1.0"

Expand Down Expand Up @@ -42,16 +40,13 @@ typedef struct pkgi_input {

#define PKGI_COUNTOF(arr) (sizeof(arr)/sizeof(0[arr]))

#define PKGI_ENABLE_LOGGING 1


#ifdef PKGI_ENABLE_LOGGING
#include <dbglogger.h>
#define LOG dbglogger_log
#else
#define LOG(...)
#endif


int pkgi_snprintf(char* buffer, uint32_t size, const char* msg, ...);
void pkgi_vsnprintf(char* buffer, uint32_t size, const char* msg, va_list args);
char* pkgi_strstr(const char* str, const char* sub);
Expand Down

0 comments on commit 3449e00

Please sign in to comment.