Files
Aldo Vargas a0f4303ec9 ps3netsrv 20240210
- Fixed compilation warning on linux
- Added linux binaries
- Updated readme.md and usage message
2024-02-10 10:32:57 -04:00

70 lines
1.3 KiB
Makefile

OS = linux
BUILD_TYPE = release_static
OUTPUT := ps3netsrv
OBJS = src/main.o src/padlock.o src/aes.o src/compat.o src/mem.o src/File.o src/VIsoFile.o
CFLAGS = -Wall -I./include -std=gnu99 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DPOLARSSL
CPPFLAGS += -Wall -I./include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DPOLARSSL
CFLAGS += -Doff64_t=off_t
CPPFLAGS += -Doff64_t=off_t
#OUTPUT := makeiso
#CFLAGS += -DMAKEISO
#CPPFLAGS += -DMAKEISO
#CFLAGS += -DNOSSL
#CPPFLAGS +=-DNOSSL
#OBJS = src/main.o src/compat.o src/mem.o src/File.o src/VIsoFile.o
LDFLAGS = -L.
LIBS = -lstdc++
ifeq ($(OS), linux)
LIBS += -lpthread
endif
ifeq ($(OS), windows)
OBJS += src/scandir.o src/dirent.o
CC = gcc
CXX = g++
LIBS += -lws2_32
OUTPUT := $(OUTPUT).exe
endif
ifeq ($(OS), cross)
OBJS += scandir.o dirent.o
CC = i586-pc-mingw32-gcc
CXX = i586-pc-mingw32-g++
LIBS += -lws2_32
OUTPUT := $(OUTPUT).exe
endif
ifeq ($(BUILD_TYPE), debug)
CFLAGS += -DDEBUG
CPPFLAGS += -DDEBUG
endif
ifeq ($(BUILD_TYPE), debug_static)
CFLAGS += -DDEBUG -static
CPPFLAGS += -DDEBUG
endif
ifeq ($(BUILD_TYPE), release)
endif
ifeq ($(BUILD_TYPE), release_static)
CFLAGS += -static
endif
all: $(OUTPUT)
rm -r -f src/*.o
clean:
rm -r -f $(OUTPUT) src/*.o
$(OUTPUT): $(OBJS)
$(LINK.c) $(LDFLAGS) -o $@ $^ $(LIBS)