-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (31 loc) · 829 Bytes
/
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
CC = g++
CFLAGS = -Wall
LIBS = `sdl2-config --cflags --libs` -lSDL2_image
OBJ = Defs.o Render.o Main.o Clock.o
all: clean main print_main clean_obj
debug: CFLAGS += -g
debug: clean main print_debug clean_obj
.cc.o:
$(CC) -c -o $@ $< $(CFLAGS) $(LIBS)
@printf "make: object: $(CC) -c -o $@ $< $(CFLAGS) $(LIBS)\n"
main: $(OBJ)
$(CC) -o PipOS.exe $^ $(CFLAGS) $(LIBS)
print_main:
@printf "make: main: $(CC) -o main $^ $(CFLAGS) $(LIBS)\n"
@printf "make: "
@printf "\033[1;32m"
@printf "Successfully created main"
@printf "\033[0m\n"
print_debug:
@printf "make: debug: $(CC) -o main $^ $(CFLAGS) $(LIBS)\n"
@printf "make: "
@printf "\033[1;32m"
@printf "Successfully created main, run [gdb ./main] to debug"
@printf "\033[0m\n"
clean_obj:
rm -f $(OBJ)
clean:
rm -f $(OBJ) main
prepare:
hg pull
hg update