mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-02-05 14:15:55 +00:00
can build libprojectM+renderer+presetfactories and projectM-SDL with some Make. cmake status: BTFO
This commit is contained in:
12
.gitignore
vendored
12
.gitignore
vendored
@ -2,15 +2,3 @@ xcuserdata
|
||||
src/projectM-emscripten/build/presets
|
||||
presets/custom
|
||||
project.xcworkspace
|
||||
|
||||
# cmake
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
CMakeScripts
|
||||
Testing
|
||||
Makefile
|
||||
cmake_install.cmake
|
||||
install_manifest.txt
|
||||
compile_commands.json
|
||||
CTestTestfile.cmake
|
||||
|
||||
|
||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "build"]
|
||||
path = build
|
||||
url = https://github.com/c3d/build.git
|
||||
1
build
Submodule
1
build
Submodule
Submodule build added at 7f0436fc27
9
src/Makefile
Normal file
9
src/Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
.PHONY: libprojectM SDL
|
||||
|
||||
all: libprojectM SDL
|
||||
|
||||
libprojectM:
|
||||
$(MAKE) -C libprojectM
|
||||
|
||||
SDL:
|
||||
$(MAKE) -C projectM-sdl
|
||||
@ -46,7 +46,7 @@
|
||||
//extern FILE *debugFile;
|
||||
#endif
|
||||
|
||||
#ifdef MACOS
|
||||
#ifdef __APPLE__
|
||||
#include <cstdio>
|
||||
extern FILE *fmemopen(void *buf, size_t len, const char *pMode);
|
||||
#endif /** MACOS */
|
||||
@ -75,7 +75,7 @@ extern FILE *fmemopen(void *buf, size_t len, const char *pMode);
|
||||
#define projectM_isnan(x) ((x) != (x))
|
||||
#endif
|
||||
|
||||
#ifdef MACOS
|
||||
#ifdef __APPLE__
|
||||
#define projectM_isnan(x) ((x) != (x))
|
||||
#endif
|
||||
|
||||
@ -87,7 +87,7 @@ extern FILE *fmemopen(void *buf, size_t len, const char *pMode);
|
||||
#define projectM_fmax(x,y) ((x) >= (y) ? (x): (y))
|
||||
#endif
|
||||
|
||||
#ifdef MACOS
|
||||
#ifdef __APPLE__
|
||||
#define projectM_fmax(x,y) ((x) >= (y) ? (x): (y))
|
||||
#endif
|
||||
|
||||
@ -99,7 +99,7 @@ extern FILE *fmemopen(void *buf, size_t len, const char *pMode);
|
||||
#define projectM_fmin(x,y) ((x) <= (y) ? (x): (y))
|
||||
#endif
|
||||
|
||||
#ifdef MACOS
|
||||
#ifdef __APPLE__
|
||||
#define projectM_fmin(x,y) ((x) <= (y) ? (x): (y))
|
||||
#endif
|
||||
|
||||
|
||||
19
src/libprojectM/Makefile
Normal file
19
src/libprojectM/Makefile
Normal file
@ -0,0 +1,19 @@
|
||||
BUILD=../../build/
|
||||
|
||||
SOURCES=projectM.cpp PCM.cpp Preset.cpp fftsg.cpp KeyHandler.cpp \
|
||||
timer.cpp wipemalloc.cpp PresetLoader.cpp PresetChooser.cpp \
|
||||
PipelineMerger.cpp ConfigFile.cpp \
|
||||
TimeKeeper.cpp PresetFactory.cpp PresetFactoryManager.cpp
|
||||
|
||||
CONFIG=libgl
|
||||
|
||||
CPPFLAGS+= -I . -I Renderer
|
||||
LDFLAGS+=-lgl
|
||||
LIBRARIES=Renderer MilkdropPresetFactory NativePresetFactory
|
||||
|
||||
PRODUCTS=libprojectM.lib
|
||||
|
||||
include $(BUILD)rules.mk
|
||||
|
||||
$(BUILD)rules.mk:
|
||||
cd .. && git submodule update --init --recursive
|
||||
28
src/libprojectM/MilkdropPresetFactory/Makefile
Normal file
28
src/libprojectM/MilkdropPresetFactory/Makefile
Normal file
@ -0,0 +1,28 @@
|
||||
BUILD=../../../build/
|
||||
|
||||
SOURCES= \
|
||||
BuiltinFuncs.cpp \
|
||||
Func.cpp MilkdropPreset.cpp \
|
||||
PresetFrameIO.cpp \
|
||||
CustomShape.cpp \
|
||||
Eval.cpp \
|
||||
MilkdropPresetFactory.cpp \
|
||||
PerPixelEqn.cpp BuiltinParams.cpp \
|
||||
InitCond.cpp Parser.cpp \
|
||||
CustomWave.cpp Expr.cpp \
|
||||
PerPointEqn.cpp Param.cpp \
|
||||
PerFrameEqn.cpp \
|
||||
IdlePreset.cpp \
|
||||
../PresetFactory.cpp \
|
||||
|
||||
|
||||
CPPFLAGS+= -I. -I..
|
||||
#LDFLAGS+=-lftgl -lgl -lfreetype -lprojectM
|
||||
|
||||
#LIBRARIES=../libprojectM
|
||||
PRODUCTS=MilkdropPresetFactory.lib
|
||||
|
||||
include $(BUILD)rules.mk
|
||||
|
||||
$(BUILD)rules.mk:
|
||||
cd .. && git submodule update --init --recursive
|
||||
10
src/libprojectM/NativePresetFactory/Makefile
Normal file
10
src/libprojectM/NativePresetFactory/Makefile
Normal file
@ -0,0 +1,10 @@
|
||||
BUILD=../../../build/
|
||||
|
||||
SOURCES=NativePresetFactory.cpp
|
||||
CPPFLAGS+= -I. -I..
|
||||
PRODUCTS=NativePresetFactory.lib
|
||||
|
||||
include $(BUILD)rules.mk
|
||||
|
||||
$(BUILD)rules.mk:
|
||||
cd .. && git submodule update --init --recursive
|
||||
@ -23,7 +23,7 @@ extern "C"
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MACOS
|
||||
#ifdef __APPLE__
|
||||
extern "C"
|
||||
{
|
||||
#include <errno.h>
|
||||
|
||||
@ -81,7 +81,7 @@ public:
|
||||
|
||||
/** Opaque pbuffer context and pbuffer */
|
||||
/*
|
||||
#ifdef MACOS
|
||||
#ifdef __APPLE__
|
||||
void *origContext;
|
||||
void *pbufferContext;
|
||||
void *pbuffer;
|
||||
|
||||
40
src/libprojectM/Renderer/Makefile
Normal file
40
src/libprojectM/Renderer/Makefile
Normal file
@ -0,0 +1,40 @@
|
||||
BUILD=../../../build/
|
||||
|
||||
SOURCES= \
|
||||
SOIL2/image_DXT.c \
|
||||
SOIL2/image_helper.c \
|
||||
SOIL2/SOIL2.c \
|
||||
SOIL2/etc1_utils.c \
|
||||
FBO.cpp \
|
||||
MilkdropWaveform.cpp \
|
||||
PerPixelMesh.cpp \
|
||||
Pipeline.cpp \
|
||||
Renderer.cpp \
|
||||
ShaderEngine.cpp \
|
||||
UserTexture.cpp \
|
||||
Waveform.cpp \
|
||||
Filters.cpp \
|
||||
PerlinNoise.cpp \
|
||||
PipelineContext.cpp \
|
||||
Renderable.cpp \
|
||||
BeatDetect.cpp \
|
||||
Shader.cpp \
|
||||
TextureManager.cpp \
|
||||
VideoEcho.cpp \
|
||||
RenderItemDistanceMetric.cpp \
|
||||
RenderItemMatcher.cpp \
|
||||
../KeyHandler.cpp
|
||||
|
||||
|
||||
CONFIG=libftgl libGL libfreetype
|
||||
|
||||
CPPFLAGS+= -I. -I.. -ISOIL2
|
||||
LDFLAGS+=-lftgl -lgl -lfreetype -lprojectM
|
||||
|
||||
LIBRARIES=../libprojectM
|
||||
PRODUCTS=Renderer.lib
|
||||
|
||||
include $(BUILD)rules.mk
|
||||
|
||||
$(BUILD)rules.mk:
|
||||
cd .. && git submodule update --init --recursive
|
||||
@ -28,7 +28,7 @@
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#ifdef MACOS
|
||||
#ifdef __APPLE__
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
#include "TextureManager.hpp"
|
||||
@ -219,7 +219,7 @@ unsigned int TextureManager::getTextureMemorySize()
|
||||
|
||||
void TextureManager::loadTextureDir()
|
||||
{
|
||||
std::string dirname = CMAKE_INSTALL_PREFIX "/share/projectM/textures";
|
||||
std::string dirname = "/usr/local/share/projectM/textures";
|
||||
|
||||
DIR * m_dir;
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ void VideoEcho::Draw(RenderContext &context)
|
||||
default: flipx=1;flipy=1; break;
|
||||
}
|
||||
|
||||
float pointsFlip[4][2] = {{-0.5*flipx, -0.5*flipy},
|
||||
double pointsFlip[4][2] = {{-0.5*flipx, -0.5*flipy},
|
||||
{-0.5*flipx, 0.5*flipy},
|
||||
{ 0.5*flipx, 0.5*flipy},
|
||||
{ 0.5*flipx, -0.5*flipy}};
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef MACOS
|
||||
#ifdef __APPLE__
|
||||
//#include <MacWindows.h>
|
||||
//#include <gl.h>
|
||||
//#include <glu.h>
|
||||
@ -84,7 +84,7 @@ class MasterRenderItemMerge;
|
||||
#pragma warning (disable:4305)
|
||||
#endif /** WIN32 */
|
||||
|
||||
#ifdef MACOS2
|
||||
#ifdef __APPLE__2
|
||||
#define inline
|
||||
#endif
|
||||
|
||||
|
||||
@ -229,7 +229,7 @@ fprintf( debugFile, "post SDL_SetVideoMode()\n" );
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MACOS
|
||||
#ifdef __APPLE__
|
||||
globalPM->fontURL = (char *)malloc( sizeof( char ) * 512 );
|
||||
strcpy( globalPM->fontURL, "../../fonts" );
|
||||
|
||||
|
||||
18
src/projectM-sdl/Makefile
Normal file
18
src/projectM-sdl/Makefile
Normal file
@ -0,0 +1,18 @@
|
||||
BUILD=../../build/
|
||||
|
||||
SOURCES= \
|
||||
pmSDL.cpp \
|
||||
projectM_SDL_main.cpp
|
||||
|
||||
CPPFLAGS+=-I. -I../libprojectM
|
||||
CPPFLAGS_macosx-clang+=-F/Library/Frameworks
|
||||
|
||||
LDFLAGS+=-framework OpenGL -F/Library/Frameworks -framework SDL2
|
||||
LIBRARIES=../libprojectM ../libprojectM/Renderer ../libprojectM/NativePresetFactory ../libprojectM/MilkdropPresetFactory
|
||||
|
||||
PRODUCTS=projectMSDL.exe
|
||||
|
||||
include $(BUILD)rules.mk
|
||||
|
||||
$(BUILD)rules.mk:
|
||||
cd .. && git submodule update --init --recursive
|
||||
@ -69,6 +69,7 @@ int projectMSDL::openAudioInput() {
|
||||
audioSampleRate = have.freq;
|
||||
audioSampleCount = have.samples;
|
||||
audioFormat = have.format;
|
||||
audioInputDevice = audioDeviceID;
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -144,8 +145,8 @@ void projectMSDL::addFakePCM() {
|
||||
}
|
||||
|
||||
void projectMSDL::resize(unsigned int width, unsigned int height) {
|
||||
width = width;
|
||||
height = height;
|
||||
this->width = width;
|
||||
this->height = height;
|
||||
settings.windowWidth = width;
|
||||
settings.windowHeight = height;
|
||||
projectM_resetGL(width, height);
|
||||
|
||||
@ -256,7 +256,7 @@ fprintf( debugFile, "post SDL_SetVideoMode()\n" );
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MACOS
|
||||
#ifdef __APPLE__
|
||||
globalPM->fontURL = (char *)malloc( sizeof( char ) * 512 );
|
||||
strcpy( globalPM->fontURL, "../../fonts" );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user