# Objective Modula-2 Compiler (objm2c) # # Makefile for use with the GCC toolchain # # Author: Peter Eiserloh # # Copyright (C) 2009 The Objective Modula-2 Project. All rights reserved. # # License # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # (1) This file, or any part thereof, may NOT be hosted on websites which # contain advertising, unless specific prior written permission has been # obtained. The licensor will grant such permission upon request at its # sole discretion to websites the licensor does NOT consider abusive in # their use of advertising. Small notices in the footer of a website # naming corporate rights holders, infrastructure providers or sponsors # are not considered advertising in the context of this license. # # (2) Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # (3) Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and other materials provided with the distribution. # # (4) Neither the author's name nor the names of any contributors may be used # to endorse or promote products derived from this software without # specific prior written permission. # # (5) Where this list of conditions or the following disclaimer, in part or # as a whole is overruled or nullified by applicable law, no permission # is granted to use the software. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # # Version history: # # 2.00 2009-07-10 PPE new file include ../version.mk SHELL = /bin/sh # --------------------------------------------------------------------------- # A P P L I C A T I O N S # --------------------------------------------------------------------------- APPL = objm2c APPL2 = calc_hashes CC = gcc CXX = g++ CFLAGS = -Wall -g CXXFLAGS = -Wall -g LDFLAGS = DEFS = OBJS = \ objm2_key_value_storage.o \ objm2_lexer.o \ objm2_reserved_words.o \ objm2_symbols.o \ objm2_tokens.o # objm2_parser.o \ # objm2_ast.o OBJS2 = calc_hashes.o LIBS = c_sources = *.c headers = *.h sources = $(c_sources) $(headers) # --------------------------------------------------------------------------- # O B J E C T F I L E S # --------------------------------------------------------------------------- %.o:%.c $(CC) -c $(CFLAGS) $< -o $@ # --------------------------------------------------------------------------- # M A I N T A R G E T S # --------------------------------------------------------------------------- all: $(APPL) $(APPL2) clean: $(RM) *.o dist: dist-clean: install: uninstall: # --------------------------------------------------------------------------- # B U I L D S # --------------------------------------------------------------------------- $(APPL): $(OBJS) $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ $(APPL2): $(OBJS2) $(CC) $(LDFLAGS) $(OBJS2) $(LIBS) -o $@ # --------------------------------------------------------------------------- # D E P E N D E N C I E S # --------------------------------------------------------------------------- include depends.mk depends.mk: Makefile $(sources) $(CC) -MM $(c_sources) >depends.mk # END OF FILE