diff options
author | Dominic Radermacher <blip@mockmoon-cybernetics.ch> | 2017-07-19 14:08:49 +0200 |
---|---|---|
committer | Dominic Radermacher <blip@mockmoon-cybernetics.ch> | 2017-07-19 14:08:49 +0200 |
commit | c57a8a9bf49fa7a3231ce8d6e435603e8ab016eb (patch) | |
tree | 6c83a316511a185cc497a4fc2237742417d3c718 /Makefile |
initial importv0.9
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3129477 --- /dev/null +++ b/Makefile @@ -0,0 +1,47 @@ +# New Makefile 2006-01-23 +# $@ = output file, $< = first input, $+ = all input files + +ECHO = /bin/echo -e +RM = /bin/rm -f +CC = gcc +STRIP = strip +CFLAGS = -g -Os -I./include -Wall -Wstrict-prototypes -Wmissing-prototypes +CFLAGS += -Wshadow -Wextra -Wunused # -Wconversion + +PROGS = hc11loader hc11debug hc11eepr + +all: $(PROGS) + +clean: + $(RM) src/*.o +tidy: + $(RM) src/*.o $(PROGS) +install: $(PROGS) + @$(ECHO) "\t==> Installing nothing" +pack: + @$(ECHO) "Cleaning up ..." ; \ + $(RM) src/*.o lib/* $(PROGS) + @$(ECHO) "Creating package ..." ; \ + VERSION=`cat include/hc11tools.h |grep VERSION |cut -d"\"" -f2`;\ + tar Jcvf hc11tools-$$VERSION.txz --directory=.. --exclude=fw_src --exclude=*.s19 hc11tools + +# Generic instructions. Don't change. +src/%.o: src/%.c + @printf "\t--> Compiling `basename $<`\n" + @$(CC) $(CFLAGS) -c $< -o $@ + +# Specific programs +hc11loader: src/hc11loader.o src/serial.o src/s19stuff.o + @printf "\t==> Linking objects to output file $@\n" + @$(CC) $(CFLAGS) $(LDFLAGS) $+ -o $@ + @$(STRIP) $@ + +hc11eepr: src/hc11eepr.o src/serial.o src/s19stuff.o + @printf "\t==> Linking objects to output file $@\n" + @$(CC) $(CFLAGS) $(LDFLAGS) $+ -o $@ + @$(STRIP) $@ + +hc11debug: src/hc11debug.o src/serial.o src/s19stuff.o src/talker.o src/tty.o src/ui.o + @printf "\t==> Linking objects to output file $@\n" + @$(CC) $(CFLAGS) $(LDFLAGS) $+ -o $@ + @$(STRIP) $@ |