-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (49 loc) · 1.92 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
# A Makefile for both Linux and Windows, 30-dec-2015
#define all executables here
app_name= gravstar
all: ${app_name}
#define compiler options
CC=g++
ifneq ($(OS),Windows_NT) #linux?
# CFLAGS=-g -O0 -fno-inline
# LIBS=-L/usr/X11/lib -L/usr/local/lib -lfltk_images /usr/local/lib/libfltk.a -lpng -lz -ljpeg -lrt -lm -lXcursor -lXfixes -lXext -lXft -lfontconfig -lXinerama -lpthread -ldl -lX11
# INCLUDE= -I/usr/local/include
INCLUDE= `pkg-config --cflags-only-I lilv-0`
CFLAGS=-g -Wno-deprecated-declarations -Wno-format-security -Wno-int-to-pointer-cast -fpermissive -fno-inline -Dbuild_date="\"`date +%Y-%b-%d`\"" #-Dbuild_date="\"2016-Mar-23\"" #64 bit
LIBS=-lfltk -lfltk_images -lfltk_gl -lX11 -lpng -lz -ljpeg -lrt -lm -lXcursor -lXfixes -lXext -lXft -lfontconfig -lXinerama -lXrender -lpthread -ldl -lX11 #64 bit
else #windows?
CFLAGS=-g -DWIN32 -mms-bitfields -Dcompile_for_windows
LIBS= -L/usr/local/lib -static -mwindows -lfltk -lfltk_images -lfltk_jpeg -lole32 -luuid -lcomctl32 -lwsock32 -lm
INCLUDE= -I/usr/local/include
endif
#define object files for each executable, see dependancy list at bottom
obj1= gravstar.o GCProfile.o pref.o GCLed.o GCCol.o
#obj2= backprop.o layer.o
#linker definition
gravstar: $(obj1)
$(CC) $(CFLAGS) -o $@ $(obj1) $(LIBS)
#linker definition
#backprop: $(obj2)
# $(CC) $(CFLAGS) -o $@ $(obj2) $(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
gravstar.o: gravstar.h GCProfile.h pref.h GCCol.h GCLed.h
GCProfile.o: GCProfile.h
pref.o: pref.h GCCol.h GCLed.h
GCCol.o: GCCol.h
GCLed.o: GCLed.h
#layer.o: layer.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