diff options
Diffstat (limited to 'hp41cx-emulator/Makefile')
| -rw-r--r-- | hp41cx-emulator/Makefile | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/hp41cx-emulator/Makefile b/hp41cx-emulator/Makefile new file mode 100644 index 0000000..03cea0d --- /dev/null +++ b/hp41cx-emulator/Makefile @@ -0,0 +1,97 @@ +# Makefile for NSIM package +# +# $Id: Makefile 68 2005-04-23 00:34:21Z eric $ +# Copyright 1995, 2003 Eric Smith <eric@brouhaha.com> +# +# 17.08.2014 add Qt Gui files and splitup into +# generic libnsim.a +# nsim the X11 Gui application and +# qtnsim the Qt Gui application +# +# NSIM is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License version 2 as published by the Free +# Software Foundation. Note that I am not granting permission to redistribute +# or modify NSIM under the terms of any later version of the General Public +# License. +# +# This program is distributed in the hope that it will be useful (or at +# least amusing), but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# this program (in the file "COPYING"); if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +# ----------------------------------------------------------------------------- +# You may need to change the following definitions. In particular you will +# need to remove the -DUSE_TIMER if you don't have the setitimer() system +# call, and you may need to chage X11LIBS and X11INCS if X isn't in /usr/X11. +# ----------------------------------------------------------------------------- +X11LIBS = -L/usr/X11R6/lib -lX11 +X11INCS = -I/usr/X11R6/include +X11SRCS = xio.cpp +X11OBJS = $(addprefix $(OBJDIR)/,$(X11SRCS:.cpp=.o)) + +AR = ar +CC = gcc +CXXFLAGS = -g -O0 -Wall -std=gnu++11 -DWARNING_G $(X11INCS) +#-DUSE_TIMER -DAUTO_POWER_OFF +# ----------------------------------------------------------------------------- +# You shouldn't have to change anything below this point, but if you do please +# let me know why so I can improve this Makefile. +# ----------------------------------------------------------------------------- + +VERSION = 0.62 + +PROGRAMS = nsim qtnsim + +HEADERS = nsim.h hprom.h hplcd.h phineas.h xio.h hprom.h hpram.h ifpf.h +LIBSRCS = nsim.cpp hprom.cpp hplcd.cpp phineas.cpp ifpf.cpp hpram.cpp +MISC = COPYING README NEWS hp41_rom # CHANGELOG + +OBJDIR = obj + +LIBOBJS = $(addprefix $(OBJDIR)/,$(LIBSRCS:.cpp=.o)) + +SOURCES = $(LIBSRCS) $(X11SRCS) +OBJECTS = $(LIBOBJS) $(X11OBJS) +DEPENDS = $(addprefix $(OBJDIR)/,$(SOURCES:.cpp=.d)) + +LIBS = -lstdc++ + +DISTFILES = $(MISC) Makefile $(HEADERS) $(SOURCES) +PACKAGE = nsim +DSTNAME = $(PACKAGE)-$(VERSION) + +all: libnsim.a $(PROGRAMS) + +$(OBJDIR): + -mkdir $@ + +qtnsim: libnsim.a + make -C ./Qtnsim ../$@ + +libnsim.a: $(LIBOBJS) + $(AR) rcs libnsim.a $(LIBOBJS) + +nsim: $(X11OBJS) libnsim.a Makefile + $(CC) -o $@ $(X11OBJS) libnsim.a $(X11LIBS) $(LIBS) + + +$(OBJDIR)/%.o:%.cpp + $(CC) -c $(CXXFLAGS) -MMD -MP -MF"$(@:%.o=%.d)" -o $@ $< + +dist: $(DISTFILES) + -rm -rf $(DSTNAME) + mkdir $(DSTNAME) + for f in $(DISTFILES); do ln $$f $(DSTNAME)/$$f; done + tar --gzip -chf $(DSTNAME).tar.gz $(DSTNAME) + -rm -rf $(DSTNAME) + +clean: + rm -f $(PROGRAMS) $(OBJECTS) $(X11OBJS) $(DEPENDS) libnsim.a + make -C Qtnsim clean + +-include $(DEPENDS)
\ No newline at end of file |
