summaryrefslogtreecommitdiff
path: root/Makefile
blob: e9b1d653d750af7766c36696688b42d4c547be94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.POSIX:

CFLAGS = -O 1
LDFLAGS =
OUTNAME = libfemtokit.a
TESTFILE = hello.c

# Where the final compilation output is going to be placed. (See Filesystem Hierarchy
# Standard.)
PREFIX = /usr/local/lib

# All object files are listed here:
OBJS = $(OBJS_PLATDEP)

# Assign the platform-dependent object file set here:
# TODO: assign a default implementation independent of the platform
OBJS_PLATDEP =

# Add platform-dependent object files in separate variables ("OBJS_NAME", e.g.
# OBJS_LINUX) and then, when running the make file, make sure to assign the
# appropriate variable to OBJS_PLATDEP (e.g. OBJS_PLATDEP = $(OBJS_LINUX) ).

all: $(OBJS)
	ar -rs $(OUTNAME) *.o

clean:
	-rm test *.o *.a

install: all
	mv -f $(OUTNAME) $(PREFIX)

test: all
	c99 -l libfemtokit.a -o test test/$(TESTFILE)

.c.o:
	c99 -c $(CFLAGS) $(LDFLAGS) -o $@ $<