lpt-signal-generator: Makefile
authorFrantišek Kučera <franta-hg@frantovo.cz>
Fri, 09 Jun 2017 23:23:25 +0200
changeset 479e2addbb9674
parent 46 616e71c2d754
child 48 254d5d1bc659
lpt-signal-generator: Makefile
c++/lpt-signal-generator/Makefile
c++/lpt-signal-generator/lpt.cpp
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/c++/lpt-signal-generator/Makefile	Fri Jun 09 23:23:25 2017 +0200
     1.3 @@ -0,0 +1,18 @@
     1.4 +CXX=g++
     1.5 +CXXFLAGS += -std=c++11 -Wall
     1.6 +
     1.7 +APP=lpt-signal-generator
     1.8 +PROGNAME=$(APP)
     1.9 +SRC=lpt.cpp
    1.10 +
    1.11 +ALL: $(PROGNAME)
    1.12 +
    1.13 +$(PROGNAME): $(SRC)
    1.14 +	$(CXX) $(CXXFLAGS) -o $(PROGNAME) $(SRC)
    1.15 +
    1.16 +clean:
    1.17 +	rm -f $(PROGNAME)
    1.18 +
    1.19 +run: $(PROGNAME)
    1.20 +	chrt 1 ./$(PROGNAME)
    1.21 +
     2.1 --- a/c++/lpt-signal-generator/lpt.cpp	Sun Jun 04 18:55:08 2017 +0200
     2.2 +++ b/c++/lpt-signal-generator/lpt.cpp	Fri Jun 09 23:23:25 2017 +0200
     2.3 @@ -38,7 +38,7 @@
     2.4  
     2.5  using namespace std;
     2.6  
     2.7 -// run this program: g++ -std=c++11 lpt.cpp && time chrt 1 ./a.out
     2.8 +// run this program: make run
     2.9  // depending on frequency and machine performance the total time will be more than given duration
    2.10  // despite the real-time priority, because some additional time is spent in outb() functions
    2.11  // so "duration" means total sleep time