Skip to content

Commit

Permalink
0.999: simple Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
zvezdochiot committed Aug 4, 2022
1 parent 2c0d0ba commit 86466e3
Show file tree
Hide file tree
Showing 34 changed files with 3,642 additions and 3,177 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
60 changes: 27 additions & 33 deletions makefile → Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,42 +19,36 @@
# Makefile for HA/gcc
############################################################################

MCH = nix

CC = gcc
CPP = $(CC) -E
CFLAGS = -Wall -O2 -c # -I../$(MCH) -I../include
LDFLAGS = -O2

MDEFINES = "CC=$(CC)" "CPP=$(CPP)" "CFLAGS=$(CFLAGS)" "DEFS=$(DEFS)"
SUBDIRS =
#OBJS = c/*.o $(MCH)/*.o
OBJS = acoder.o archive.o asc.o cpy.o error.o ha.o haio.o hsc.o info.o \
machine.o misc.o swdict.o
TARGET = ha

CC ?= gcc
CFLAGS ?= -Wall -O2
LDFLAGS ?= $(CFLAGS) -s

SRCS = src/acoder.c \
src/archive.c \
src/asc.c \
src/cpy.c \
src/error.c \
src/haio.c \
src/hsc.c \
src/info.c \
src/machine.c \
src/misc.c \
src/swdict.c \
src/ha.c
OBJS = $(SRCS:%.c=%.o)
RM ?= rm -f

$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) $^ -o $@

.c.o:
$(CC) -c $(CFLAGS) $<

ha : $(OBJS)
$(CC) $(LDFLAGS) -o ha $(OBJS)

subdirs:
@for i in $(SUBDIRS); do (cd $$i && echo $$i && $(MAKE) $(MDEFINES)) || exit; done

depend dep:
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) $(MDEFINES) dep) || exit; done
$(CC) $(CFLAGS) -c $< -o $@

clean:
@for i in $(SUBDIRS); do (cd $$i && $(MAKE) clean) || exit; done
rm -f .depend ha *.out *~ *.o
$(RM) $(TARGET) $(OBJS)

install:
install: $(TARGET)
mkdir -p $(DESTDIR)/usr/bin
cp -v ha $(DESTDIR)/usr/bin/

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
cp -v $(TARGET) $(DESTDIR)/usr/bin/
9 changes: 9 additions & 0 deletions readme → README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
`ORG.FSMS:`
![GitHub release (latest by date)](https://img.shields.io/github/v/release/FS-make-simple/ha)
![GitHub Release Date](https://img.shields.io/github/release-date/FS-make-simple/ha)
![GitHub repo size](https://img.shields.io/github/repo-size/FS-make-simple/ha)
![GitHub all releases](https://img.shields.io/github/downloads/FS-make-simple/ha/total)
![GitHub](https://img.shields.io/github/license/FS-make-simple/ha)

# HA

HA is an archiver which I released in january 1993 as version 0.98.
After that I had plans to improve speed, archive handling etc. which
would have required total rewrite of the code. For that I unfortunately
Expand Down
Loading

0 comments on commit 86466e3

Please sign in to comment.