summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2018-06-03 00:04:50 +0100
committerFreeArtMan <dos21h@gmail.com>2018-06-03 00:04:50 +0100
commit587dd24b5970aa3605cc2bc2826f7e35344b4317 (patch)
treefe57c7f01376939eda9974c6bdfd2d5be1f9a832 /Makefile
downloadlibarg++-587dd24b5970aa3605cc2bc2826f7e35344b4317.tar.gz
libarg++-587dd24b5970aa3605cc2bc2826f7e35344b4317.zip
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ab57711
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+PROJ=libarg
+CC=g++
+CFLAGS=-Wall -fpermissive -fno-rtti -fno-exceptions -fno-unwind-tables -Wno-comment
+LDFLAGS=
+
+SOURCE=arg
+OBJECTS=$(SOURCE:=.o)
+SOURCES=$(SOURCE:=.c)
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $<
+
+make: dynamic static
+
+dynamic: CFLAGS+=-fPIC
+dynamic: clean $(OBJECTS)
+ $(CC) $(CFLAGS) $(OBJECTS) -shared -o $(PROJ).so
+
+static: clean $(OBJECTS)
+ ar rcs $(PROJ).a $(OBJECTS)
+
+
+clean:
+ rm -rf *.o
+ rm -rf *.a
+ rm -rf *.so \ No newline at end of file