-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
98 lines (73 loc) · 1.77 KB
/
Makefile
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#
# Makefile
#
CXX = g++
CC = gcc
LD = g++
AR = ar
LIBS =
SLIBS =
LFLAGS =
ifdef DEBUG
CFLAGS = -g -O0
else
CFLAGS = -O3
endif
prefix = /usr/local
exec_prefix = ${prefix}
top_builddir = .
ifeq ($(OS),Windows_NT)
W32 = 1
export W32
endif
ifeq ($(W32),1)
EXE_SFX = .exe
endif
#
# SDL2 stuff
#
SDL_CONFIG = sdl2-config
SDL_SLIBS := `$(SDL_CONFIG) --static-libs`
SDL_LIBS := `$(SDL_CONFIG) --libs`
SDL_CFLAGS := `$(SDL_CONFIG) --cflags`
#
# Makefile for EUPPlayer
#
INCLUDES =
bin_PROGRAMS = eupplay$(EXE_SFX)
eupplay_LDADD = -lstdc++
eupplay_SOURCES = eupplay.cpp eupplayer.cpp eupplayer.hpp eupplayer_towns.hpp eupplayer_townsEmulator.cpp eupplayer_townsEmulator.hpp eupplayer_townsInternal.cpp eupplayer_townsInternal.hpp sintbl.cpp sintbl.hpp
PROGRAMS = $(bin_PROGRAMS)
TARGET = $(PROGRAMS)
#
# all
#
all : $(TARGET)
DEFS = -DPACKAGE=\"eupplayer\" -DVERSION=\"0.008\" -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 -DEUPPLAYER_LITTLE_ENDIAN=1 -I.
CPPFLAGS += $(SDL_CFLAGS)
LDFLAGS += $(SDL_LIBS)
LIBS += $(SDL_LIBS)
eupplay_OBJECTS = eupplay.o eupplayer.o eupplayer_townsEmulator.o \
eupplayer_townsInternal.o sintbl.o
CXXFLAGS = -g -O2 -Wall -fomit-frame-pointer -funroll-loops
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(CXXLD) $(CXXFLAGS) $(LDFLAGS) -o $@
CFLAGS =
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
TAR = tar
GZIP_ENV = --best
SOURCES = $(eupplay_SOURCES)
OBJECTS = $(eupplay_OBJECTS)
%.o : %.cpp
$(CXXCOMPILE) -o $@ $< -c
$(TARGET): $(eupplay_OBJECTS)
@rm -f $(bin_PROGRAMS)
$(CXXLINK) $(eupplay_LDFLAGS) $(eupplay_OBJECTS) $(eupplay_LDADD) $(LIBS)
clean:
rm -f $(eupplay_OBJECTS)
rm -f $(bin_PROGRAMS)
release:
strip $(TARGET)