mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-25 04:33:45 +03:00
Use CPPFLAGS when needed
This commit is contained in:
parent
25388ecac2
commit
1020437aad
@ -21,10 +21,10 @@ endif
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: all
|
||||
all: build
|
||||
|
||||
.PHONY: build
|
||||
|
||||
build: $(LIBTARGET) $(DYLIBTARGET)
|
||||
|
||||
$(LIBTARGET): $(OBJS)
|
||||
@ -32,26 +32,24 @@ $(LIBTARGET): $(OBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
$(DYLIBTARGET): $(OBJS)
|
||||
$(CC) -shared -o $@ $^ $(LDFLAGS)
|
||||
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -shared -o $@ $^ $(LDFLAGS)
|
||||
|
||||
-include $(DEPS)
|
||||
|
||||
%.d: %.c
|
||||
@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
|
||||
@$(CPP) $(CPPFLAGS) $< -MM -MT $(@:.d=.o) >$@
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS) $(DYLIBTARGET) $(LIBTARGET)
|
||||
|
||||
.PHONY: cleandep
|
||||
cleandep: clean
|
||||
$(RM) $(DEPS)
|
||||
|
||||
|
||||
.PHONY: install
|
||||
|
||||
install: build
|
||||
mkdir -p ${PREFIX}/idris2-${IDRIS2_VERSION}/lib
|
||||
mkdir -p ${PREFIX}/idris2-${IDRIS2_VERSION}/support/c
|
||||
|
@ -15,10 +15,10 @@ ifeq ($(OLD_WIN), 1)
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: all
|
||||
all: build
|
||||
|
||||
.PHONY: build
|
||||
|
||||
build: $(LIBTARGET)
|
||||
|
||||
$(LIBTARGET): $(OBJS)
|
||||
@ -28,20 +28,19 @@ $(LIBTARGET): $(OBJS)
|
||||
-include $(DEPS)
|
||||
|
||||
%.d: %.c
|
||||
@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
|
||||
@$(CPP) $(CPPFLAGS) $< -MM -MT $(@:.d=.o) >$@ $(LDFLAGS)
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS) $(LIBTARGET)
|
||||
|
||||
.PHONY: cleandep
|
||||
cleandep: clean
|
||||
$(RM) $(DEPS)
|
||||
|
||||
|
||||
.PHONY: install
|
||||
|
||||
install: build
|
||||
mkdir -p ${PREFIX}/idris2-${IDRIS2_VERSION}/support/refc
|
||||
install -m 644 $(LIBTARGET) *.h ${PREFIX}/idris2-${IDRIS2_VERSION}/support/refc
|
||||
|
Loading…
Reference in New Issue
Block a user