aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile19
-rw-r--r--main.cpp12
2 files changed, 31 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6ec3cd0
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+PREFIX=$(PREFIX)
+all:
+ g++ *.cpp -o me -Wall -O2
+
+clean: me
+ rm 'me'
+
+test:
+ echo $$PREFIX
+
+install: me
+ if [ -z "$$PREFIX" ] ; then \
+ echo "No PREFIX set. Aborting install."; \
+ else \
+ echo "Installing in $$PREFIX/bin/..."; \
+ cp me "$$PREFIX"/bin/me; \
+ echo "Done."; \
+ fi
+
diff --git a/main.cpp b/main.cpp
new file mode 100644
index 0000000..b0846a7
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,12 @@
+#include <iostream>
+
+int main(int argc, char** argv) {
+ if (argc < 2) {
+ std::cout << "Please provide a file path.";
+ return 1;
+ }
+
+ std::string filepath(argv[1]);
+
+ return 0;
+}