Makefile revision 160157
1219820Sjeff# Makefile for IPF unwind express library, libuwx. 2219820Sjeff# 3219820Sjeff# To build a cross-unwind library (i.e., one hosted on a 4219820Sjeff# non-IPF, non-HP-UX system), omit the "self" callbacks 5219820Sjeff# and the dependency on libuca by setting SELFOBJS and 6219820Sjeff# SELFLIBS to empty strings. 7219820Sjeff 8219820SjeffAR = ar 9219820SjeffRANLIB = : 10219820Sjeff 11219820SjeffOTHERCFLAGS = 12219820Sjeff# OTHERCFLAGS = -DUWX_TRACE_ENABLE # Enables trace output 13219820Sjeff# OTHERCFLAGS = +DD64 # Builds 64-bit library 14219820Sjeff 15219820SjeffCFLAGS = -O $(OTHERCFLAGS) 16219820Sjeff 17219820SjeffOBJS = uwx_bstream.o uwx_context.o uwx_env.o uwx_scoreboard.o \ 18219820Sjeff uwx_step.o uwx_str.o uwx_swap.o uwx_symbols.o \ 19219820Sjeff uwx_trace.o uwx_uinfo.o uwx_utable.o 20219820Sjeff 21219820Sjeff# SELFOBJS = # For cross-unwind library 22219820Sjeff# SELFOBJS = uwx_self.o uwx_self_context.o uwx_ttrace.o 23219820SjeffSELFOBJS = uwx_self.o uwx_self_context.o 24219820Sjeff 25219820Sjeff# SELFLIBS = # For cross-unwind library 26219820SjeffSELFLIBS = -luca 27219820Sjeff 28219820Sjefflibuwx.a: $(OBJS) $(SELFOBJS) 29219820Sjeff $(AR) rv libuwx.a $? 30219820Sjeff $(RANLIB) libuwx.a 31219820Sjeff 32219820Sjefflibuwx.so: $(OBJS) $(SELFOBJS) 33219820Sjeff ld -b -o libuwx.so $(OBJS) $(SELFOBJS) $(SELFLIBS) 34219820Sjeff 35219820Sjefflibuwx.sl: $(OBJS) $(SELFOBJS) 36219820Sjeff ld -b -o libuwx.sl $(OBJS) $(SELFOBJS) $(SELFLIBS) 37219820Sjeff 38219820Sjeffclean: 39219820Sjeff rm -f $(OBJS) $(SELFOBJS) libuwx.a libuwx.so libuwx.sl 40219820Sjeff 41219820Sjeffuwx_bstream.o: uwx.h uwx_env.h uwx_bstream.h 42219820Sjeff 43219820Sjeffuwx_context.o: uwx.h uwx_env.h uwx_scoreboard.h uwx_step.h uwx_trace.h 44219820Sjeff 45219820Sjeffuwx_env.o: uwx.h uwx_env.h uwx_scoreboard.h uwx_str.h uwx_trace.h 46219820Sjeff 47219820Sjeffuwx_scoreboard.o: uwx.h uwx_env.h uwx_scoreboard.h uwx_trace.h 48219820Sjeff 49219820Sjeffuwx_step.o: uwx.h uwx_env.h uwx_context.h uwx_utable.h \ 50219820Sjeff uwx_uinfo.h uwx_scoreboard.h uwx_str.h uwx_trace.h 51219820Sjeff 52219820Sjeffuwx_str.o: uwx.h uwx_env.h uwx_str.h 53219820Sjeff 54219820Sjeffuwx_swap.o: uwx.h uwx_env.h uwx_swap.h 55219820Sjeff 56219820Sjeffuwx_symbols.o: uwx.h uwx_env.h uwx_symbols.h 57219820Sjeff 58219820Sjeffuwx_trace.o: uwx.h uwx_env.h uwx_uinfo.h uwx_scoreboard.h uwx_trace.h 59219820Sjeff 60219820Sjeffuwx_uinfo.o: uwx.h uwx_env.h uwx_uinfo.h uwx_utable.h \ 61219820Sjeff uwx_scoreboard.h uwx_bstream.h uwx_trace.h 62219820Sjeff 63219820Sjeffuwx_utable.o: uwx.h uwx_env.h uwx_utable.h uwx_swap.h uwx_trace.h 64219820Sjeff 65219820Sjeffuwx_self.o: uwx.h uwx_env.h uwx_context.h uwx_trace.h uwx_self.h \ 66219820Sjeff uwx_symbols.h 67219820Sjeff 68219820Sjeffuwx_self_context.o: uwx_self_context.s 69219820Sjeff $(CC) -c $(CFLAGS) -o uwx_self_context.o uwx_self_context.s 70219820Sjeff 71219820Sjeffuwx_ttrace.o: uwx.h uwx_env.h uwx_context.h uwx_trace.h uwx_ttrace.h 72219820Sjeff