summaryrefslogtreecommitdiff
path: root/exar/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'exar/Makefile')
-rw-r--r--exar/Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/exar/Makefile b/exar/Makefile
new file mode 100644
index 00000000..c8db4a4b
--- /dev/null
+++ b/exar/Makefile
@@ -0,0 +1,34 @@
+ORIG_CFLAGS := $(CFLAGS)
+
+CFLAGS := -Wall -pedantic -Werror -Wextra -std=c99 -Os
+CFLAGS += $(ORIG_CFLAGS)
+
+DCFLAGS += -g -O0 -Wall -pedantic -Werror -Wextra -std=c99
+DCFLAGS += $(ORIG_CFLAGS)
+
+TARGET = exar
+OBJ = $(patsubst %.c, %.o, $(wildcard *.c))
+
+SHARED_OBJ = exar.o
+
+all: $(SHARED_OBJ)
+
+$(TARGET): $(OBJ)
+ @echo $(CC) -o $@
+ @$(CC) $(OBJ) -o $@ $(CFLAGS) $(CPPFLAGS)
+
+%.o: %.c
+ @echo $(CC) $<
+ @$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS)
+
+debug:
+ make CFLAGS="$(DCFLAGS)"
+
+cgdb:
+ make CFLAGS="$(DCFLAGS)"
+ cgdb exar
+
+clean:
+ $(RM) -rf $(OBJ) $(TARGET)
+
+.PHONY: clean