aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-10-30 21:29:30 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2012-10-30 21:29:30 +0000
commit62f81e5cafbacfb90ac0f86e52e8e3176aa5ba8f (patch)
tree8f8f6028fa880b3296b1e42bc8d87cead73aaf78 /Makefile
downloaddhex-62f81e5cafbacfb90ac0f86e52e8e3176aa5ba8f.tar.gz
Imported Upstream version 0.65upstream/0.65
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile45
1 files changed, 45 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d72dde1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,45 @@
+CC= gcc
+LDFLAGS= -L/usr/lib -L/usr/local/lib -L/usr/lib/ncurses -L/usr/local/lib/ncurses
+CPPFLAGS= -I/usr/include -I/usr/local/include -I/usr/include/ncurses -I/usr/local/include/ncurses
+CFLAGS= -O3 -Wall -std=c99
+#CFLAGS+= -ffunction-sections -fdata-sections
+#LDFLAGS+= --gc-sections
+LIBS= -lncurses
+DESTDIR= /usr/local/
+
+OFILES=buffers.o \
+ configfile.o \
+ correlation.o \
+ gpl.o \
+ hexcalc.o \
+ input.o \
+ machine_type.o \
+ main.o \
+ markers.o \
+ menu.o \
+ output.o \
+ search.o \
+ ui.o
+
+all: dhex
+
+dhex: $(OFILES)
+ $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
+
+install:all
+ strip dhex
+ cp dhex $(DESTDIR)/bin
+ cp dhex.1 $(DESTDIR)/share/man/man1
+ cp dhexrc.5 $(DESTDIR)/share/man/man5
+ cp dhex_markers.5 $(DESTDIR)/share/man/man5
+ cp dhex_searchlog.5 $(DESTDIR)/share/man/man5
+
+
+
+.c.o:
+ $(CC) $< -c -I. $(CPPFLAGS) $(CFLAGS) $(OPTIONS)
+
+clean:
+ rm -f dhex $(OFILES)
+
+