summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..92f2aee
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+PREFIX := /usr/local
+BIN_DIR := $(PREFIX)/bin
+
+ifdef PCC
+PCC_CFLAGS=-D__float128="long double"
+else
+PCC_CFLAGS=
+endif
+
+
+OBJS = libtcc-test.o
+
+CFLAGS = $(PCC_CFLAGS) $(CFLAGS_EXTRA)
+
+OBJ_NAME = libtcc-test
+
+all : clean $(OBJ_NAME)
+
+$(OBJ_NAME) : $(OBJS)
+ $(CC) $(OBJS) $(CFLAGS) -ltcc -o $(OBJ_NAME)
+%.o : %.c
+ $(CC) -c $< -o $@ $(CFLAGS)
+clean :
+ rm -f $(OBJ_NAME) *.o
+install :
+ install -D -m755 $(OBJ_NAME) $(BIN_DIR)/$(OBJ_NAME)
+uninstall :
+ rm -f $(BIN_DIR)/$(OBJ_NAME)