-
Notifications
You must be signed in to change notification settings - Fork 25
/
Makefile.sdlwx
41 lines (31 loc) · 911 Bytes
/
Makefile.sdlwx
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
#!/usr/bin/make -f
SRCDIR = src
INSTALLDIR= ~/emu80
CC = c++
CFLAGS = -c -Wall -std=c++11 `wx-config --cflags` `sdl2-config --cflags` -DPAL_SDL -DPAL_WX
LDFLAGS = `sdl2-config --libs` `wx-config --libs` -lGL
SRC = $(SRCDIR)/*.cpp
SRCSDL = $(SRCDIR)/sdl/*.cpp
SRCLITE = $(SRCDIR)/lite/*.cpp
SRCWX = $(SRCDIR)/wx/*.cpp
SOURCES = $(shell echo $(SRC)) $(shell echo $(SRCSDL)) $(shell echo $(SRCWX))
SOURCES_LITE = $(shell echo $(SRC)) $(shell echo $(SRCSDL)) $(shell echo $(SRCLITE))
OBJECTS = $(SOURCES:.cpp=.o)
OBJECTS_LITE = $(SOURCES_LITE:.cpp=.o)
all: Emu80
Emu80: $(OBJECTS)
$(CC) $(OBJECTS) $(LDFLAGS) -o $@
.cpp.o:
$(CC) $(CFLAGS) $< -o $@
clean:
rm -f $(OBJECTS)
rm -f $(OBJECTS_LITE)
rm -f Emu80
rm -f Emu80lite
install: Emu80
mkdir -p $(INSTALLDIR)
cp Emu80 $(INSTALLDIR)
cp -r dist/* $(INSTALLDIR)
cp COPYING.txt $(INSTALLDIR)
cp whatsnew.txt $(INSTALLDIR)
cp doc/* $(INSTALLDIR)