-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (40 loc) · 1.52 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
# A Makefile for both Linux and Windows, 06-dec-2017
#define all executables here
app_name= flip_leaf_clock
all: ${app_name}
#define compiler options
CC=g++
ifneq ($(OS),Windows_NT) #linux?
CFLAGS=-g -O3 -Wfatal-errors -Wfatal-errors -fpermissive -Dbuild_date="\"`date +%Y-%b-%d`\"" #-Dbuild_date="\"2016-Mar-23\"" #64 bit
LIBS= -lX11 -lrt -lm -lXfixes -lXext -lXft #64 bit
INCLUDE= -I/usr/include/freetype2 #64 bit
else #windows?
# CFLAGS=-g -DWIN32 -mms-bitfields -Dcompile_for_windows -Dbuild_date="\"`date +%Y\ %b\ %d`\""
#LIBS= -L/usr/local/lib -static -mwindows -lfltk_images -lfltk -lfltk_png -lfltk_jpeg -lole32 -luuid -lcomctl32 -lwsock32 -lWs2_32 -lm -lfftw3 -lwinmm
# INCLUDE= -I/usr/local/include
endif
#define object files for each executable, see dependancy list at bottom
obj1= flip_leaf_clock.o GCProfile.o texturewrap_code.o
#obj2= backprop.o layer.o
#linker definition
flip_leaf_clock: $(obj1)
$(CC) $(CFLAGS) -o $@ $(obj1) $(LIBS)
#compile definition for all cpp files to be complied into .o files
%.o: %.c
$(CC) $(CFLAGS) $(INCLUDE) -c $<
%.o: %.cpp
$(CC) $(CFLAGS) $(INCLUDE) -c $<
%.o: %.cxx
$(CC) $(CFLAGS) $(INCLUDE) -c $<
#dependancy list per each .o file
flip_leaf_clock.o: flip_leaf_clock.h GCProfile.h texturewrap_code.h
GCProfile.o: GCProfile.h
texturewrap_code.o: texturewrap_code.h GCProfile.h
.PHONY : clean
clean :
-rm $(obj1) #remove obj files
ifneq ($(OS),Windows_NT)
-rm ${app_name} #remove linux exec
else
-rm ${app_name}.exe #remove windows exec
endif