## ## ## $Id$ ##----------------------------------------------------------------------- ## ## (c) Copyright 2002 by GATS, Inc., ## 11864 Canon Blvd, Suite 101, Newport News VA 23606 ## ## All Rights Reserved. No part of this software or publication may be ## reproduced, stored in a retrieval system, or transmitted, in any form ## or by any means, electronic, mechanical, photocopying, recording, or ## otherwise without the prior written permission of GATS, Inc. ## ##----------------------------------------------------------------------- ## ## Module: Makefile ## ## Author: John Burton ## ## Date: Wed Sep 25 15:28:00 2002 ## ##----------------------------------------------------------------------- ## ## Modification History: ## ## $Log$ ## ##----------------------------------------------------------------------- ## ##----------------------------------------------------------------------- ## Include Files: ##----------------------------------------------------------------------- ## ## ##----------------------------------------------------------------------- ## Defines and Macros: ##----------------------------------------------------------------------- ## MAJOR = 0 MINOR = 1 PATCH = 0 VERSION = $(MAJOR).$(MINOR).$(PATCH) CC = gcc CPP = g++ HOST = 'hostname' LIBDIR = ../../lib INCDIR = ../../include LFLAGS = -+ #OPTIONS = -O3 -Wall -Werror-implicit-function-declaration \ # -march=pentium4 -mfpmath=sse -msse2 OPTIONS = -g #OPTIONS = -O3 #INCLUDES = -I./ -I/users/gats/local/include -I/usr/local/dislin INCLUDES = -I./ -I../../include LINCLUDES = -L./ -L../../lib #LDFLAGS = -ldislnc -lcii -llinepak4-0_1 -lg2c -lrfftw -lfftw -lm_p -lc_p #LDFLAGS = -lgrace_np -lcii -llinepak4-0_1 -lg2c -lrfftw -lfftw -lm LDFLAGS = #DEFINES = -DDEBUG=1 CFLAGS = $(OPTIONS) $(DEFINES) $(INCLUDES) PROG = TestCMarkup MAIN = TestCMarkup.cpp override CPPFLAGS += -fpermissive ## ##----------------------------------------------------------------------- ## Objects: ##----------------------------------------------------------------------- ## LIB = libCMarkup.$(VERSION).a LIBMAJ = libCMarkup.a SHLIB = libCMarkup.so.$(VERSION) SHLIBMAJ = libCMarkup.so.$(MAJOR) INCFILE = CMarkup.h \ GATS_CMarkup_Exception.h OBJS = $(LIB)(CMarkup.o) \ $(LIB)(GATS_CMarkup_Exception.o) ## ##----------------------------------------------------------------------- ## Targets: ##----------------------------------------------------------------------- ## # #------------------------------------------------------------------------ # Target for converting a lex or yacc file to C code, then compiling and # adding it to an archive file #------------------------------------------------------------------------ # .l.a: $(LEX) $(LFLAGS) $< mv lex.yy.cc $*.cpp $(CPP) -c $(CFLAGS) -o $*.o $*.cpp $(AR) $(ARFLAGS) $@ $*.o rm -f $*.o # rm -f $*.cpp .y.a: $(YACC) $(YFLAGS) $< mv $*.tab.c $*.c $(CC) -c $(CFLAGS) $*.c $(AR) $(ARFLAGS) $@ $*.o rm -f $*.o rm -f $*.c # #------------------------------------------------------------------------ # Target for creating the main program #------------------------------------------------------------------------ # $(LIB): $(OBJS) $(DEFS) ranlib $(LIB) ln -sf $(LIB) $(LIBMAJ) lib: install # $(LIB) init: $(INCFILE) install $(INCFILE) $(INCDIR) clean: rm $(PROG) $(LIB) $(LIBMAJ) *.o install: init $(LIB) install $(LIB) $(LIBDIR) (cd $(LIBDIR) && ln -sf $(LIB) $(LIBMAJ) )