-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
53 lines (40 loc) · 1.51 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
#Makefile generated by amake
#On Wed Feb 1 19:43:06 2017
#To print amake help use 'amake --help'.
CC=gcc
CPPC=g++
LINK=g++
SRCDIR=./src
OBJDIR=obj
FLAGS=-g -Wall -std=c++11
LIBS=
OBJS=$(OBJDIR)/options.o $(OBJDIR)/main.o $(OBJDIR)/uinput.o $(OBJDIR)/events.o $(OBJDIR)/joypads.o $(OBJDIR)/log.o
EXEC=js2xbox
DATE=$(shell date +"%Y-%m-%d")
$(EXEC) : $(OBJS)
$(LINK) $(OBJS) -o $(EXEC) $(FLAGS) $(LIBS)
$(OBJDIR)/options.o: src/options.cpp src/options.h $(OBJDIR)/__setup_obj_dir
$(CPPC) $(FLAGS) ./src/options.cpp -c -o $@
$(OBJDIR)/main.o: src/main.cpp src/log.h src/options.h src/events.h src/uinput.h \
src/joypads.h $(OBJDIR)/__setup_obj_dir
$(CPPC) $(FLAGS) ./src/main.cpp -c -o $@
$(OBJDIR)/uinput.o: src/uinput.cpp src/uinput.h src/events.h src/joypads.h $(OBJDIR)/__setup_obj_dir
$(CPPC) $(FLAGS) ./src/uinput.cpp -c -o $@
$(OBJDIR)/events.o: src/events.cpp src/events.h src/log.h src/options.h $(OBJDIR)/__setup_obj_dir
$(CPPC) $(FLAGS) ./src/events.cpp -c -o $@
$(OBJDIR)/joypads.o: src/joypads.cpp src/joypads.h src/events.h $(OBJDIR)/__setup_obj_dir
$(CPPC) $(FLAGS) ./src/joypads.cpp -c -o $@
$(OBJDIR)/log.o: src/log.cpp src/log.h src/options.h $(OBJDIR)/__setup_obj_dir
$(CPPC) $(FLAGS) ./src/log.cpp -c -o $@
$(OBJDIR)/__setup_obj_dir :
mkdir -p $(OBJDIR)
touch $(OBJDIR)/__setup_obj_dir
.PHONY: clean bzip release
clean :
rm -rf $(OBJDIR)/*.o
rm -rf $(EXEC)
bzip :
tar -cvf "$(DATE).$(EXEC).tar" $(SRCDIR)/* Makefile
bzip2 "$(DATE).$(EXEC).tar"
release : FLAGS +=-O3 -D_RELEASE
release : $(EXEC)