-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (42 loc) · 864 Bytes
/
Copy pathMakefile
File metadata and controls
53 lines (42 loc) · 864 Bytes
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
OS = windows
BUILD_TYPE = release
OUTPUT := ps3netsrv
OBJS=main.o compat.o File.o VIsoFile.o
CFLAGS=-Wall -I. -std=gnu99 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
LDFLAGS=-L.
LIBS = -lstdc++
ifeq ($(OS), linux)
LIBS += -lpthread
endif
ifeq ($(OS), windows)
OBJS += scandir.o 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)
clean:
rm -f $(OUTPUT) *.o
$(OUTPUT): $(OBJS)
$(LINK.c) $(LDFLAGS) -o $@ $^ $(LIBS)