BlinkenArea - GitList
Repositories
Blog
Wiki
libetherpix
Code
Commits
Branches
Tags
Search
Tree:
371800c
Branches
Tags
master
libetherpix
simulator
Makefile
begin of simulator: window skeleton
Stefan Schuermans
commited
371800c
at 2017-06-07 21:38:03
Makefile
Blame
History
Raw
# EtherPix simulator # # Copyright 2017 Stefan Schuermans <stefan schuermans info> SRCS_GLADE := $(wildcard *.glade) SRCS_CXX := $(wildcard *.cpp) TARGET := etherpix_sim PACKAGES := gtkmm-3.0 CXX := g++ DEFINES := INCLUDE := CFLAGS := -Wall -Wextra -Werror -g -O2 $(shell pkg-config --cflags $(PACKAGES)) LDFLAGS := $(shell pkg-config --libs-only-L $(PACKAGES)) LIBS := $(shell pkg-config --libs-only-l $(PACKAGES)) GEN_HDRS=$(addsuffix .h,$(SRCS_GLADE)) SRCS_BASE := $(SRCS_CXX:.cpp=) DEPS := $(addsuffix .d,$(SRCS_BASE)) OBJS := $(addsuffix .o,$(SRCS_BASE)) .PHONY: all clean .SUFFIXES: .SECONDARY: all: $(GEN_HDRS) $(DEPS) $(TARGET) ifneq ($(MAKECMDGOALS),clean) -include $(DEPS) endif %.glade.h: %.glade Makefile echo "static const char *widgets_$* =" >$@ sed 's/["]/\\&/g;s/^/ "/;s/$$/\\n"/' <$< >>$@ echo " ;" >>$@ %.d: %.cpp Makefile | $(GEN_HDRS) $(CXX) $(DEFINES) $(INCLUDE) $(CFLAGS) -M -o $@ $< %.o: %.cpp Makefile $(CXX) $(DEFINES) $(INCLUDE) $(CFLAGS) -c -o $@ $< $(TARGET): $(OBJS) $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) clean: rm -f $(GEN_HDRS) $(DEPS) $(OBJS) $(TARGET)