Fixed *.d handling, fixed sdl2 flags
This commit is contained in:
parent
3dad4173e7
commit
de1f188a6d
14
Makefile
14
Makefile
@ -39,7 +39,11 @@ else
|
|||||||
CXXFLAGS += -D NDEBUG -O3
|
CXXFLAGS += -D NDEBUG -O3
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LDLIBS := -lm -lscgui -lSDL2 -lcairo -lscerror -lscstring -lscscreensaver -lscnumerics
|
LDLIBS := -lm -lscgui -lcairo -lscerror -lscstring -lscscreensaver -lscnumerics
|
||||||
|
|
||||||
|
LDLIBS += $(shell pkg-config sdl2 --libs)
|
||||||
|
CXXFLAGS += $(shell pkg-config sdl2 --cflags)
|
||||||
|
|
||||||
UNAME_S := $(shell uname -s)
|
UNAME_S := $(shell uname -s)
|
||||||
|
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
@ -53,15 +57,13 @@ endif
|
|||||||
|
|
||||||
all: $(BIN) modules
|
all: $(BIN) modules
|
||||||
|
|
||||||
$(BIN): $(OBJS) $(DEPS)
|
$(BIN): $(OBJS)
|
||||||
$(CXX) $(OBJS) $(LDFLAGS) $(LDLIBS) -o $(BIN)
|
$(CXX) $(OBJS) $(LDFLAGS) $(LDLIBS) -o $(BIN)
|
||||||
|
|
||||||
%.o: %.cpp %.d Makefile
|
%.o %.d: %.cpp
|
||||||
$(CXX) $(CXXFLAGS) -MMD -MP -MT $@ -MF $*.d -c $<
|
$(CXX) $(CXXFLAGS) -MMD -MP -MT $@ -MF $*.d -c $<
|
||||||
|
|
||||||
-include *.d
|
-include $(DEPS)
|
||||||
|
|
||||||
%.d: ;
|
|
||||||
|
|
||||||
new:
|
new:
|
||||||
@./newmodule $(NEW_ARGS)
|
@./newmodule $(NEW_ARGS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user