From ee621d9e7570532215feb116d8a6484146a73e14 Mon Sep 17 00:00:00 2001 From: Sam Ellicott Date: Thu, 14 May 2020 01:35:57 -0400 Subject: [PATCH 1/4] Added makefile to compile on Windows with clang --- colorchord2/windows/Makefile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 colorchord2/windows/Makefile diff --git a/colorchord2/windows/Makefile b/colorchord2/windows/Makefile new file mode 100644 index 0000000..23983f7 --- /dev/null +++ b/colorchord2/windows/Makefile @@ -0,0 +1,33 @@ +all : colorchord + +OUTS := OutputVoronoi.o DisplayArray.o OutputLinear.o DisplayPie.o DisplayNetwork.o DisplayUSB2812.o DisplayDMX.o OutputProminent.o RecorderPlugin.o DisplayHIDAPI.o hidapi.o OutputCells.o DisplaySHM.o DisplayFileWrite.o + +SRCS := ../main.c ../dft.c ../decompose.c ../filter.c ../color.c ../notefinder.c ../util.c ../outdrivers.c +SRCS += ../parameters.c ../chash.c ../OutputVoronoi.c ../OutputProminent.c ../DisplayArray.c +SRCS += ../OutputLinear.c ../DisplayPie.c ../DisplayNetwork.c ../hook.c ../RecorderPlugin.c +SRCS += ../../embeddedcommon/DFT32.c ../OutputCells.c ../configs.c ../hidapi.c ../DisplayHIDAPI.c + +WINGCC:= clang -fcolor-diagnostics + +WINGCCFLAGS:= -g -D_CRT_SECURE_NO_WARNINGS -Wno-deprecated-declarations -DICACHE_FLASH_ATTR= -I../../embeddedcommon -I../cnfa -I../rawdraw -I../ -O1 #-O2 -Wl,--relax -Wl,--gc-sections -ffunction-sections -fdata-sections +WINLDFLAGS:=-lwinmm -lgdi32 -lws2_32 -lsetupapi + +RAWDRAWLIBS:=-lX11 -lm -lpthread -lXinerama -lXext +LDLIBS:=-lpthread -lasound -lm -lpulse-simple -lpulse -ludev -lrt + + +CFLAGS:=-g -O1 -flto -Wall -ffast-math -I../embeddedcommon -I. -Icnfa -Irawdraw -DICACHE_FLASH_ATTR= +EXTRALIBS:=-lusb-1.0 + +OBJS:=../main.o ../dft.o ../decompose.o ../filter.o ../color.o ../notefinder.o ../util.o ../outdrivers.o $(OUTS) ../parameters.o ../chash.o ../hook.o ../../embeddedcommon/DFT32.o ../configs.o + +colorchord : $(OBJS) + gcc -o $@ $^ $(CFLAGS) $(LDLIBS) $(EXTRALIBS) $(RAWDRAWLIBS) + + +colorchord.exe : $(SRCS) + $(WINGCC) $(WINGCCFLAGS) -o $@ $^ $(WINLDFLAGS) + + +clean : + rm -rf *.o *~ colorchord colorchord.exe embeddedcc $(OBJS) From 7c6f7c6aaf1e4a6373322074091b81aa0fb2e105 Mon Sep 17 00:00:00 2001 From: Sam Ellicott Date: Thu, 14 May 2020 01:48:19 -0400 Subject: [PATCH 2/4] Update main.c so that it matches latest code --- colorchord2/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colorchord2/main.c b/colorchord2/main.c index 62110e1..2fd9402 100644 --- a/colorchord2/main.c +++ b/colorchord2/main.c @@ -429,7 +429,7 @@ int main(int argc, char ** argv) Now = OGGetAbsoluteTime(); double Last = Now; - while( !bQuitColorChord ) + while( !headless ) { char stt[1024]; //Handle Rawdraw frame swappign From 3030d2a8735d4d7616f3a68d2042067f0cd259e5 Mon Sep 17 00:00:00 2001 From: Sam Ellicott Date: Thu, 14 May 2020 01:49:01 -0400 Subject: [PATCH 3/4] Update Makefile to compile with clang --- colorchord2/windows/Makefile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/colorchord2/windows/Makefile b/colorchord2/windows/Makefile index 23983f7..0701174 100644 --- a/colorchord2/windows/Makefile +++ b/colorchord2/windows/Makefile @@ -1,4 +1,4 @@ -all : colorchord +all : colorchord.exe OUTS := OutputVoronoi.o DisplayArray.o OutputLinear.o DisplayPie.o DisplayNetwork.o DisplayUSB2812.o DisplayDMX.o OutputProminent.o RecorderPlugin.o DisplayHIDAPI.o hidapi.o OutputCells.o DisplaySHM.o DisplayFileWrite.o @@ -15,19 +15,10 @@ WINLDFLAGS:=-lwinmm -lgdi32 -lws2_32 -lsetupapi RAWDRAWLIBS:=-lX11 -lm -lpthread -lXinerama -lXext LDLIBS:=-lpthread -lasound -lm -lpulse-simple -lpulse -ludev -lrt - -CFLAGS:=-g -O1 -flto -Wall -ffast-math -I../embeddedcommon -I. -Icnfa -Irawdraw -DICACHE_FLASH_ATTR= -EXTRALIBS:=-lusb-1.0 - OBJS:=../main.o ../dft.o ../decompose.o ../filter.o ../color.o ../notefinder.o ../util.o ../outdrivers.o $(OUTS) ../parameters.o ../chash.o ../hook.o ../../embeddedcommon/DFT32.o ../configs.o -colorchord : $(OBJS) - gcc -o $@ $^ $(CFLAGS) $(LDLIBS) $(EXTRALIBS) $(RAWDRAWLIBS) - - colorchord.exe : $(SRCS) $(WINGCC) $(WINGCCFLAGS) -o $@ $^ $(WINLDFLAGS) - clean : rm -rf *.o *~ colorchord colorchord.exe embeddedcc $(OBJS) From 72d8e1dce9cb62208f35af2649082309194ff323 Mon Sep 17 00:00:00 2001 From: Sam Ellicott Date: Thu, 14 May 2020 01:50:50 -0400 Subject: [PATCH 4/4] Make CNFA module point to CaiB's repo --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index ae541d5..0803dc3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,7 +6,7 @@ url = https://github.com/cntools/rawdraw [submodule "colorchord2/cnfa"] path = colorchord2/cnfa - url = https://github.com/cnlohr/cnfa + url = https://github.com/CaiB/cnfa [submodule "colorchord2/android/rawdrawandroid"] path = colorchord2/android/rawdrawandroid url = https://github.com/cnlohr/rawdrawandroid