summaryrefslogtreecommitdiffstats
path: root/src/Makefile
diff options
context:
space:
mode:
authorXANTRONIX Development2023-09-13 14:40:48 -0400
committerXANTRONIX Development2023-09-13 14:40:48 -0400
commitb89c79b5a8b2084574f2645d7034ba595b9d5cd0 (patch)
tree3d792b341ccf98567725e8b12d6e81801b95351e /src/Makefile
parent4451e2f2ef709ad4ad0e519a0310cc1e31c0d25a (diff)
downloadzxdump-b89c79b5a8b2084574f2645d7034ba595b9d5cd0.tar.gz
zxdump-b89c79b5a8b2084574f2645d7034ba595b9d5cd0.tar.bz2
zxdump-b89c79b5a8b2084574f2645d7034ba595b9d5cd0.zip
Refactor stuff into separate files, finally
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..ba8a9b0
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,27 @@
+CC = cc
+CFLAGS = -g -Wall -O2
+LDFLAGS =
+OBJS = charset.o basic.o hexdump.o main.o
+NAME = zxdump
+
+PREFIX = /usr/local
+INSTALL = /usr/bin/install
+RM = /bin/rm
+
+INCLUDE_PATH = ../include
+HEADERS_SUBDIR = zx
+HEADERS_BUILD = $(addprefix $(INCLUDE_PATH)/$(HEADERS_SUBDIR)/, $(HEADERS))
+
+all: $(NAME)
+
+$(NAME): $(OBJS)
+ $(CC) $(OBJS) -o $(NAME) $(LDFLAGS)
+
+$(OBJS): %.o: %.c $(HEADERS_BUILD)
+ $(CC) $(CFLAGS) -I$(INCLUDE_PATH) -c $<
+
+install: $(NAME)
+ $(INSTALL) -c -m 0755 $(NAME) $(PREFIX)/bin
+
+clean:
+ $(RM) -f $(NAME) $(OBJS)