mirror of
https://github.com/drakmor/nanoDNS.git
synced 2026-10-19 01:59:58 -05:00
28 lines
576 B
Makefile
28 lines
576 B
Makefile
PS5_HOST ?= ps5
|
|
PS5_PORT ?= 9021
|
|
|
|
ifdef PS5_PAYLOAD_SDK
|
|
include $(PS5_PAYLOAD_SDK)/toolchain/prospero.mk
|
|
else
|
|
$(error PS5_PAYLOAD_SDK is undefined)
|
|
endif
|
|
|
|
ELF := nanodns.elf
|
|
ELF_STRIP := $(firstword $(wildcard $(PS5_PAYLOAD_SDK)/bin/prospero-llvm-strip) \
|
|
$(wildcard $(PS5_PAYLOAD_SDK)/bin/prospero-strip))
|
|
|
|
CFLAGS := -Wall -Wextra -Werror -O2 -std=c11 -DPLATFORM_PS5=1
|
|
LDLIBS := -lSceNet
|
|
|
|
all: $(ELF)
|
|
|
|
$(ELF): main.c
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS)
|
|
$(ELF_STRIP) --strip-all $@
|
|
|
|
clean:
|
|
rm -f $(ELF)
|
|
|
|
test: $(ELF)
|
|
$(PS5_DEPLOY) -h $(PS5_HOST) -p $(PS5_PORT) $^
|