-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.linux
69 lines (52 loc) · 1.27 KB
/
Makefile.linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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)