summaryrefslogtreecommitdiff
path: root/embedding_example/Makefile
blob: 73287f48b6582251fc3c469ecf7537853d963e54 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CFLAG += -I ../install/include/luajit-2.0/  -I ../install/include/nerv/
LDFLAG += -L../install/lib/ -lluajit-5.1 -Wl,-rpath=../install/lib/ -lluaT -lnervcore
GCC := gcc

.PHONY: FORCE

all: main FORCE
clean:
	-rm -f *.o
	-rm main

FORCE: ../install/bin/luarocks
	echo "#!/bin/bash" > run.sh
	$< path >> run.sh
	echo "./main" >> run.sh
main: main.o
	$(GCC) -o $@ $<  $(LDFLAG)

main.o: main.c
	$(GCC) $(CFLAG) -o $@ $< -c