summaryrefslogtreecommitdiff
path: root/igen
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2022-02-17 21:16:58 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2022-02-18 10:05:01 -0400
commitbb88d7c8640a89ed943773ff5b7c34a67377fc9d (patch)
treeb512b20290f6f52ff64b9af211b079b6488acc66 /igen
parentab0517cc4a6077c756d03c7c19311f5bd841d856 (diff)
igen: Add Makefile.
Diffstat (limited to 'igen')
-rw-r--r--igen/Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/igen/Makefile b/igen/Makefile
new file mode 100644
index 0000000..73cef90
--- /dev/null
+++ b/igen/Makefile
@@ -0,0 +1,27 @@
+PREFIX := /usr/local
+BIN_DIR := $(PREFIX)/bin
+
+ifdef PCC
+PCC_CFLAGS=-D__float128="long double"
+else
+PCC_CFLAGS=
+endif
+
+OBJS = igen.o lexer.o misc.o preprocessor.o
+
+CFLAGS = $(PCC_CFLAGS) $(CFLAGS_EXTRA)
+
+OBJ_NAME = igen
+
+all : clean $(OBJ_NAME)
+
+$(OBJ_NAME): $(OBJS)
+ $(CC) $< $(CFLAGS) -o $@
+%.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)