]> git.ipfire.org Git - ipfire-2.x.git/blame - src/fake-environ/Makefile
Merge remote-tracking branch 'origin/next' into thirteen
[ipfire-2.x.git] / src / fake-environ / Makefile
CommitLineData
4c8608f0
MT
1
2ifeq "$(CFLAGS)" ""
3 $(error CLFAGS not defined.)
4endif
5
6ifeq "$(TOOLS_DIR)" ""
7 $(error TOOLS_DIR not defined.)
8endif
9
10LIB = libpakfire_preload.so
11
12SOURCES = $(wildcard *.c)
13OBJECTS = $(patsubst %.c,%.o,$(SOURCES))
14
15.PHONY: all
16all: $(LIB)
17
18%.o: %.c Makefile
19 $(CC) $(CFLAGS) -o $@ -c $<
20
21$(LIB): $(OBJECTS)
1718b2f4 22 $(CC) $(CFLAGS) -shared -o $@ $? -ldl -static-libgcc
4c8608f0
MT
23
24.PHONY: install
25install: all
26 -mkdir -pv $(TOOLS_DIR)/lib/
27 install -p -m 755 $(LIB) $(TOOLS_DIR)/lib
28
29.PHONY: clean
30clean:
31 $(LIB)