diff options
| author | Tom Harley | 2020-01-11 19:46:15 +0000 |
|---|---|---|
| committer | Tom Harley | 2020-01-11 19:46:15 +0000 |
| commit | 9e87372371794bc3e7d46698141966c00acaad0e (patch) | |
| tree | 068da13d97cefed2e49ab06843e1dd9d97c32f6a /Makefile | |
| parent | Added int width specifiers (diff) | |
| download | sinter-9e87372371794bc3e7d46698141966c00acaad0e.tar.gz sinter-9e87372371794bc3e7d46698141966c00acaad0e.zip | |
Tidying up
- Removed unused example files
- Removed redundant common.c
- Added extra files to make sure the current version compiles the nqueens solution correctly
- Added extensionless files to .gitignore
- Added a way to install sinter
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 23 |
1 files changed, 16 insertions, 7 deletions
@@ -3,24 +3,33 @@ CXX = clang++ YACC = bison LEX = flex -DEBUG = -ggdb3 -O0 -DGC_DEBUG +INSTALL = install -c + +DEBUG = -ggdb3 -DGC_DEBUG RELEASE = -O2 -DNDEBUG -CFLAGS = --std=c99 -Wpedantic -Wall -Wextra -Werror $(DEBUG) +CFLAGS = --std=c99 -Wpedantic -Wall -Wextra -Werror $(RELEASE) LFLAGS = -D_POSIX_C_SOURCE=200809L LLVM_MODULES = core executionengine mcjit interpreter analysis native bitwriter -CFLAGS += $(shell llvm-config --cflags) -I$(HOME)/usr/include +CFLAGS += $(shell llvm-config --cflags) CXXFLAGS += $(shell llvm-config --cppflags) -LDFLAGS += $(shell llvm-config --ldflags) -L$(HOME)/usr/lib -LDLIBS += $(shell llvm-config --libs $(LLVM_MODULES) --system-libs) -lgc +LDFLAGS += $(shell llvm-config --ldflags) +LDLIBS += $(shell llvm-config --libs $(LLVM_MODULES) --system-libs) -.PHONY: default all clean test +.PHONY: default all clean test install uninstall default: all -all: sinter common.o +all: sinter + +install: all + $(INSTALL) -d $(PREFIX)/bin/ + $(INSTALL) sinter $(PREFIX)/bin/ + +uninstall: + $(RM) $(PREFIX)/bin/sinter sinter.o: sinter.h parse.h debug.h error.h scope.h llvm_codegen.h \ graphviz_codegen.h |
