parent
dbb6fa1cb1
commit
bdaeea31f8
|
@ -0,0 +1,48 @@
|
|||
--- Makefile 2018-11-04 13:26:07.744752852 -0700
|
||||
+++ Makefile 2018-11-04 13:27:46.074222441 -0700
|
||||
@@ -1,25 +1,26 @@
|
||||
-CFLAGS=-O3 --std=gnu++11
|
||||
-LFLAGS=-s -lpng
|
||||
+CFLAGS+= -O3 --std=gnu++11
|
||||
+LFLAGS+= -s -lpng
|
||||
SRCD = source
|
||||
SRC = $(wildcard $(SRCD)/*.cpp)
|
||||
OBJD = obj
|
||||
OBJ = $(patsubst $(SRCD)/%.cpp,$(OBJD)/%.o,$(SRC))
|
||||
TSTD = tests
|
||||
-INSTALL_PATH=/usr/local
|
||||
+PREFIX?=/usr/local
|
||||
+target=$(DESTDIR)$(PREFIX)
|
||||
|
||||
$(shell mkdir -p $(OBJD) >/dev/null)
|
||||
|
||||
bfk: $(OBJD) $(OBJ)
|
||||
@echo Linking: $@
|
||||
- @g++ -o bfk $(OBJ) $(LFLAGS)
|
||||
+ @$(CXX) -o bfk $(OBJ) $(LFLAGS)
|
||||
|
||||
$(OBJD)/%.o: $(SRCD)/%.cpp
|
||||
@echo Compiling: $(<F)
|
||||
- @g++ $(CFLAGS) -c -o $@ $<
|
||||
+ @$(CXX) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
$(OBJD)/%.d: $(SRCD)/%.cpp
|
||||
@set -e; rm -f $@; \
|
||||
- g++ --std=gnu++11 -MM -MT $(OBJD)/$(*F).o $(CPPFLAGS) $< > $@.$$$$; \
|
||||
+ $(CXX) --std=gnu++11 -MM -MT $(OBJD)/$(*F).o $(CPPFLAGS) $< > $@.$$$$; \
|
||||
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
|
||||
rm -f $@.$$$$
|
||||
|
||||
@@ -34,10 +35,10 @@
|
||||
@$(MAKE) --silent -C $(TSTD)/ clean
|
||||
|
||||
install: bfk
|
||||
- @install -m 0755 bfk $(INSTALL_PATH)/bin/
|
||||
+ @install -m 0755 bfk $(target)/bin
|
||||
|
||||
remove:
|
||||
- @rm -fv $(INSTALL_PATH)/bin/bfk
|
||||
+ @rm -fv $(target)/bin/bfk
|
||||
|
||||
test: bfk
|
||||
@sync bfk
|
|
@ -0,0 +1,18 @@
|
|||
# Template file for 'Brainfunk'
|
||||
pkgname=Brainfunk
|
||||
version=0.9.0
|
||||
revision=1
|
||||
wrksrc=${pkgname}-${version}-beta
|
||||
build_style=gnu-makefile
|
||||
make_use_env=yes
|
||||
makedepends="png++"
|
||||
short_desc="Brainfuck optimizing interpreter and compiler"
|
||||
maintainer="misuchiru03 <misuchiru03+void@gmail.com>"
|
||||
license="GPL-3.0-or-later"
|
||||
homepage="https://github.com/GReaperEx/Brainfunk"
|
||||
distfiles="${homepage}/archive/v${version}-beta.tar.gz"
|
||||
checksum=6b48bd1fbe0dbce20f3e8af5c799023ea820ddc45aca8fac0ccecfa2de359ee2
|
||||
|
||||
do_install() {
|
||||
vbin bfk
|
||||
}
|
Loading…
Reference in New Issue