updated Makefiles for smoother running.
parent
b32fd115e5
commit
24944e0dc9
|
@ -2,13 +2,21 @@ SHADERS=GLSL-ashimanoise.vert GLSL-ashimanoise2D.frag \
|
|||
GLSL-ashimanoise3D.frag GLSL-ashimanoise4D.frag
|
||||
COMDIR=../common
|
||||
VPATH=$(COMDIR)
|
||||
EXECNAME=noisebench
|
||||
OUTPUTFILE=ashimanoise.log
|
||||
|
||||
all: noisebench links_done
|
||||
all: $(EXECNAME) links_done
|
||||
|
||||
noisebench: noisebench.c
|
||||
$(EXECNAME): noisebench.c
|
||||
gcc -I. -I/usr/X11/include $^ -lglfw -o $@
|
||||
|
||||
links_done: $(SHADERS)
|
||||
ln -s $? . ; touch links_done
|
||||
|
||||
clean:
|
||||
- rm $(EXECNAME) $(SHADERS) links_done $(OUTPUTFILE)
|
||||
|
||||
run:
|
||||
./$(EXECNAME)
|
||||
cat $(OUTPUTFILE)
|
||||
|
||||
|
|
|
@ -1,24 +1,32 @@
|
|||
SHADERS=GLSL-ashimanoise.vert GLSL-ashimanoise2D.frag \
|
||||
GLSL-ashimanoise3D.frag GLSL-ashimanoise4D.frag
|
||||
EXECNAME=noisebench
|
||||
OUTPUTFILE=ashimanoise.log
|
||||
COMDIR=../common
|
||||
VPATH=$(COMDIR)
|
||||
|
||||
OBJS=noisebench.o
|
||||
SHADERS=GLSL-ashimanoise.vert GLSL-ashimanoise2D.frag \
|
||||
GLSL-ashimanoise3D.frag GLSL-ashimanoise4D.frag
|
||||
|
||||
VPATH=$(COMDIR)
|
||||
CFLAGS=-I. -I/usr/X11/include
|
||||
LDFLAGS=-framework Cocoa -framework OpenGL -lglfw
|
||||
|
||||
all: noisebench.app links_done
|
||||
.PHONY: all clean run
|
||||
|
||||
all: $(EXECNAME).app links_done
|
||||
|
||||
links_done: $(SHADERS)
|
||||
ln -s $? . ; touch links_done
|
||||
|
||||
noisebench.app: noisebench
|
||||
$(EXECNAME).app: $(EXECNAME)
|
||||
./bundle.sh $@ $^ ; chmod a-x $^
|
||||
|
||||
noisebench: $(OBJS)
|
||||
$(EXECNAME): $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -r noisebench.app; rm noisebench links_done $(OBJS) $(SHADERS)
|
||||
|
||||
- rm -r $(EXECNAME).app
|
||||
- rm $(EXECNAME) links_done $(OBJS) $(SHADERS) $(OUTPUTFILE)
|
||||
|
||||
run:
|
||||
open -W -a $(EXECNAME)
|
||||
cat $(OUTPUTFILE)
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ fi
|
|||
|
||||
bundle_name="$1"
|
||||
exec_file="$2"
|
||||
exec_name=`basename $bundle_name .app`
|
||||
|
||||
if [ ! -f $exec_file ]; then
|
||||
echo "Can't find $exec_file"
|
||||
|
@ -37,20 +38,16 @@ if [ ! -f "${bundle_name}/Contents/Info.plist" ]; then
|
|||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${bundle_name}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.1</string>
|
||||
<key>CFBundleName</key> <string>${exec_name}</string>
|
||||
<key>CFBundleExecutable</key> <string>${exec_name}</string>
|
||||
<key>CFBundleIdentifier</key> <string>com.ashimaarts.${exec_name}</string>
|
||||
<key>CFBundleVersion</key> <string>0.1</string>
|
||||
|
||||
<key>CFBundlePackageType</key> <string>APPL</string>
|
||||
<key>CFBundleDevelopmentRegion</key> <string>English</string>
|
||||
<key>CFBundleSignature</key> <string>????</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key> <string>6.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
.PHONY: default clean Linux MacOSX Win32
|
||||
|
||||
default:
|
||||
@echo Usage: ; echo 'make [Linux | MacOSX | Win32 ]'
|
||||
|
||||
clean:
|
||||
cd Linux ; make clean
|
||||
cd MacOSX ; make clean
|
||||
cd Win32 ; make clean
|
||||
|
||||
Linux:
|
||||
cd common ; make
|
||||
cd $@ ; make ; make run
|
||||
|
||||
MacOSX:
|
||||
cd common ; make
|
||||
cd $@ ; make ; make run
|
||||
|
||||
Win32:
|
||||
cd common ; make
|
||||
cd $@ ; make ; make run
|
||||
|
|
@ -7,7 +7,7 @@ SHADERS=GLSL-ashimanoise2D.frag GLSL-ashimanoise3D.frag \
|
|||
all: $(SHADERS)
|
||||
|
||||
clean:
|
||||
rm $(SHADERS)
|
||||
- rm $(SHADERS)
|
||||
|
||||
GLSL-ashimanoise2D.frag: $(SRCDIR)/noise2D.glsl $(COMMON)
|
||||
cpp -P -I$(SRCDIR) -DSHADER=\"noise2D.glsl\" \
|
||||
|
|
Loading…
Reference in New Issue